Correct reraising of exception
When an exception was caught and rethrown, it should call 'raise' without any arguments because it shows the place where an exception occured initially instead of place where the exception re-raised. Change-Id: I57a1cb70ee7b7d839ccb86ae025b5161bd93a014
This commit is contained in:
parent
ac6e95b6ae
commit
77613948fd
|
@ -79,8 +79,8 @@ def filter_exceptions(fn):
|
|||
def wrapper(*a, **kw):
|
||||
try:
|
||||
return fn(*a, **kw)
|
||||
except exceptions.Backend as e:
|
||||
raise e
|
||||
except exceptions.Backend:
|
||||
raise
|
||||
except Exception as e:
|
||||
LOG.error(_LE("Unhandled exception %s"), str(e), exc_info=True)
|
||||
raise exceptions.Backend(str(e))
|
||||
|
|
|
@ -141,7 +141,7 @@ class Knot2Backend(base.AgentBackend):
|
|||
except Exception as e:
|
||||
self._execute_knotc('conf-abort')
|
||||
LOG.info(_LI("Zone change aborted: %r"), e)
|
||||
raise e
|
||||
raise
|
||||
else:
|
||||
self._execute_knotc('conf-commit')
|
||||
|
||||
|
|
|
@ -372,7 +372,7 @@ class DynECTBackend(base.Backend):
|
|||
client.put(url, data=data)
|
||||
break
|
||||
else:
|
||||
raise e
|
||||
raise
|
||||
|
||||
client.put(url, data={'activate': True})
|
||||
client.logout()
|
||||
|
|
Loading…
Reference in New Issue