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:
bhavani.cr 2017-07-07 17:02:04 +05:30
parent 2fd8b52b7f
commit 655c7f7e61
1 changed files with 2 additions and 2 deletions

View File

@ -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)