Skip to content
Snippets Groups Projects
Commit f6a3e3c9 authored by Wannes Rombouts's avatar Wannes Rombouts
Browse files

Re-added .message on exception for old python versions

parent e99e28bb
No related branches found
No related tags found
No related merge requests found
......@@ -132,7 +132,7 @@ class exceptionsToHTTPError(exceptionManager):
exceptionManager.__init__(self, exceptions or self.exceptions)
def handle(self, exc_type, exc_value, traceback):
msg = self.message.format(exception=exc_value.message, **self.msg_args)
msg = self.message.format(exception=getattr(exc_value, "message", str(exc_value)), **self.msg_args)
raise self.HTTPError(message=msg)
class nargString(list):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment