Commit 6323afd5 authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review

Merge "Make exception catching more python3-ish"

parents 184544ec 03069bfa
......@@ -68,7 +68,7 @@ class FloatingIPController(rest.RestController):
try:
body = request.body_dict
except Exception as e:
if e.message != 'TODO: Unsupported Content Type':
if str(e) != 'TODO: Unsupported Content Type':
raise
else:
# Got a blank body
......
......@@ -72,8 +72,8 @@ def filter_exceptions(fn):
except exceptions.Backend as e:
raise e
except Exception as e:
LOG.error(_LE("Unhandled exception %s"), e.message, exc_info=True)
raise exceptions.Backend(e.message)
LOG.error(_LE("Unhandled exception %s"), e, exc_info=True)
raise exceptions.Backend(e)
return wrapper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment