Stop using deprecated 'message' attribute in Exception
The 'message' attribute has been deprecated and removed from Python3. For more details, please check: https://www.python.org/dev/peps/pep-0352/ P.S. The 'message' attribute still exists in the below file. masakari/api/validation/validators.py Because jsonschema.ValidationError has 'message' attribute: http://python-jsonschema.readthedocs.io/en/latest/errors/#jsonschema.exceptions.ValidationError.message Change-Id: Id83f15b6d7c7cd4811f2b2e2e56db607a0e19f4d
This commit is contained in:
parent
42e4807626
commit
cc90f7edb7
|
@ -228,7 +228,7 @@ def failover_segment_get_all_by_filters(
|
|||
marker=marker_row,
|
||||
sort_dirs=sort_dirs)
|
||||
except db_exc.InvalidSortKey as e:
|
||||
raise exception.InvalidSortKey(e.message)
|
||||
raise exception.InvalidSortKey(e)
|
||||
|
||||
return query.all()
|
||||
|
||||
|
@ -395,7 +395,7 @@ def host_get_all_by_filters(
|
|||
marker=marker_row,
|
||||
sort_dirs=sort_dirs)
|
||||
except db_exc.InvalidSortKey as e:
|
||||
raise exception.InvalidSortKey(e.message)
|
||||
raise exception.InvalidSortKey(e)
|
||||
|
||||
return query.all()
|
||||
|
||||
|
@ -547,7 +547,7 @@ def notifications_get_all_by_filters(
|
|||
marker=marker_row,
|
||||
sort_dirs=sort_dirs)
|
||||
except db_exc.InvalidSortKey as err:
|
||||
raise exception.InvalidSortKey(err.message)
|
||||
raise exception.InvalidSortKey(err)
|
||||
|
||||
return query.all()
|
||||
|
||||
|
|
Loading…
Reference in New Issue