Merge "Always delete exc_info tuple, even if reply fails"

This commit is contained in:
Jenkins 2016-03-10 12:44:19 +00:00 committed by Gerrit Code Review
commit 955088bc19

View File

@ -145,9 +145,11 @@ class RPCDispatcher(dispatcher.DispatcherBase):
# by another exception raise by a log handler during # by another exception raise by a log handler during
# LOG.exception(). So keep a copy and delete it later. # LOG.exception(). So keep a copy and delete it later.
exc_info = sys.exc_info() exc_info = sys.exc_info()
try:
LOG.error(_LE('Exception during message handling: %s'), e, LOG.error(_LE('Exception during message handling: %s'), e,
exc_info=exc_info) exc_info=exc_info)
incoming.reply(failure=exc_info) incoming.reply(failure=exc_info)
finally:
# NOTE(dhellmann): Remove circular object reference # NOTE(dhellmann): Remove circular object reference
# between the current stack frame and the traceback in # between the current stack frame and the traceback in
# exc_info. # exc_info.