Comment 0 for bug 1465300

Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

This code has been found during examination of oslo.messaing's code:
impl_rabbit.py line number ~646

            except Exception as ex:
                # NOTE(comstud): Unfortunately it's possible for amqplib
                # to return an error not covered by its transport
                # connection_errors in the case of a timeout waiting for
                # a protocol response. (See paste link in LP888621)
                # So, we check all exceptions for 'timeout' in them
                # and try to reconnect in this case.
                if 'timeout' not in six.text_type(e):
                    raise
                e = ex

There is possible an error: e = ex comes after if-section, this makes if useless and always to raise exception .