diff options
author | Denis V. Meltsaykin <dmeltsaykin@mirantis.com> | 2015-06-15 17:33:36 +0300 |
---|---|---|
committer | Denis V. Meltsaykin <dmeltsaykin@mirantis.com> | 2015-06-15 17:43:13 +0300 |
commit | 3ac14ae54881d47a96cb506ca3fcad39f245d42c (patch) | |
tree | 669022d0b12558908dc2bdffccaeaf1cb6c53fe8 | |
parent | 228badecc543da94bed3507c1efc30a4a4517552 (diff) | |
download | oslo-messaging-3ac14ae54881d47a96cb506ca3fcad39f245d42c.tar.gz |
Fix possible usage of undefined variable
In reconnect() the variable is defined after it's being used in
if-section. This could lead to undefined behavior while getting
timeout exception.
Closes-Bug: #1465314
Change-Id: I97720f793728af2158152b7aafcc0ca9a45a6b07
-rw-r--r-- | oslo/messaging/_drivers/impl_rabbit.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oslo/messaging/_drivers/impl_rabbit.py b/oslo/messaging/_drivers/impl_rabbit.py index d06b251..e5469da 100644 --- a/oslo/messaging/_drivers/impl_rabbit.py +++ b/oslo/messaging/_drivers/impl_rabbit.py @@ -619,9 +619,9 @@ class Connection(object): # a protocol response. (See paste link in LP888621) # So, we check all exceptions for 'timeout' in them # and try to reconnect in this case. + e = ex if 'timeout' not in six.text_type(e): raise - e = ex log_info = {} log_info['err_str'] = e |