diff options
author | Matus Valo <matusvalo@users.noreply.github.com> | 2021-05-19 14:05:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-19 14:05:14 +0200 |
commit | a920bb036515645460799f0019e294963a28e1ee (patch) | |
tree | f74642ffb684490aa0201e6e83ed9e96768c05d9 /kombu | |
parent | 3b6cd13d3b6da22f86a23b93b66c49133776cc75 (diff) | |
download | kombu-a920bb036515645460799f0019e294963a28e1ee.tar.gz |
Revert "chore: Refactor code quality issues (#1320)" (#1342)
This reverts commit 3b6cd13d3b6da22f86a23b93b66c49133776cc75.
Diffstat (limited to 'kombu')
-rw-r--r-- | kombu/transport/qpid.py | 5 | ||||
-rw-r--r-- | kombu/utils/compat.py | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/kombu/transport/qpid.py b/kombu/transport/qpid.py index 66ee69a5..cacd3489 100644 --- a/kombu/transport/qpid.py +++ b/kombu/transport/qpid.py @@ -584,7 +584,10 @@ class Channel(base.StdChannel): :rtype: bool """ - return bool(self._broker.getQueue(queue)) + if self._broker.getQueue(queue): + return True + else: + return False def queue_declare(self, queue, passive=False, durable=False, exclusive=False, auto_delete=True, nowait=False, diff --git a/kombu/utils/compat.py b/kombu/utils/compat.py index d758cd08..8adc49b8 100644 --- a/kombu/utils/compat.py +++ b/kombu/utils/compat.py @@ -130,7 +130,7 @@ def nested(*managers): # pragma: no cover while exits: exit = exits.pop() try: - if sys.exit(*exc): + if exit(*exc): exc = (None, None, None) except: exc = sys.exc_info() |