diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-03-25 13:55:00 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-03-25 13:55:00 +0000 |
commit | 7b558e5e99536f36e35ec64e3a88043fdffd620d (patch) | |
tree | 67be02f7ef1ffaf4a434a80b3443856e2beb133f | |
parent | a14e1e16a71c8f11520f6cf250713fad4b81284c (diff) | |
parent | 6aa85a546022feb078a3382e0a168def318bdb6d (diff) | |
download | oslo-messaging-7b558e5e99536f36e35ec64e3a88043fdffd620d.tar.gz |
Merge "Always delete exc_info tuple, even if reply fails" into stable/mitaka4.6.0
-rw-r--r-- | oslo_messaging/rpc/dispatcher.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/oslo_messaging/rpc/dispatcher.py b/oslo_messaging/rpc/dispatcher.py index b3a2995..cecef22 100644 --- a/oslo_messaging/rpc/dispatcher.py +++ b/oslo_messaging/rpc/dispatcher.py @@ -145,13 +145,15 @@ class RPCDispatcher(dispatcher.DispatcherBase): # by another exception raise by a log handler during # LOG.exception(). So keep a copy and delete it later. exc_info = sys.exc_info() - LOG.error(_LE('Exception during message handling: %s'), e, - exc_info=exc_info) - incoming.reply(failure=exc_info) - # NOTE(dhellmann): Remove circular object reference - # between the current stack frame and the traceback in - # exc_info. - del exc_info + try: + LOG.error(_LE('Exception during message handling: %s'), e, + exc_info=exc_info) + incoming.reply(failure=exc_info) + finally: + # NOTE(dhellmann): Remove circular object reference + # between the current stack frame and the traceback in + # exc_info. + del exc_info def _dispatch(self, ctxt, message): """Dispatch an RPC message to the appropriate endpoint method. |