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/ Change-Id: I56705c925da3f35f198378712fd766558fa1860e
This commit is contained in:
parent
2fd8b52b7f
commit
655c7f7e61
@ -84,7 +84,7 @@ class SchemaValidator(object):
|
||||
path = '/'.join(map(six.text_type, ex.path))
|
||||
detail = _("Invalid input for field '%(path)s': "
|
||||
"%(message)s") % {'path': path,
|
||||
'message': ex.message}
|
||||
'message': six.text_type(ex)}
|
||||
else:
|
||||
detail = ex.message
|
||||
detail = six.text_type(ex)
|
||||
raise exception.SchemaValidationError(detail=detail)
|
||||
|
Loading…
Reference in New Issue
Block a user