Merge "Make exception catching more python3-ish"
This commit is contained in:
commit
6323afd556
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue