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: I6514be276561525ca17d8bc6e43b8c7312aa5b76
This commit is contained in:
rajat29 2017-08-01 16:38:17 +05:30
parent d906c733a2
commit 81c91f6701

View File

@ -77,7 +77,7 @@ class Rest(flask.Blueprint):
return func(**kwargs)
except ex.DistilException as e:
LOG.error('Error during API call: %s' % str(e))
return render_error_message(e.code, e.message)
return render_error_message(e.code, str(e))
except Exception as e:
return render_error_message(500, str(e))