summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmer Katz <omer.drow@gmail.com>2020-08-30 20:37:50 +0300
committerAsif Saif Uddin <auvipy@gmail.com>2020-08-31 14:05:09 +0600
commit46bdf6d5d962bd37be8cb9a64d07b51bd597fe3d (patch)
tree13b50ffffb37368605016d5d465574773cfddbd5
parentb82a2d56fe110bd2699301288f3202fd3c17258b (diff)
downloadpy-amqp-46bdf6d5d962bd37be8cb9a64d07b51bd597fe3d.tar.gz
Happify linters without errors.
-rw-r--r--amqp/channel.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/amqp/channel.py b/amqp/channel.py
index 5f33b0f..5d0a343 100644
--- a/amqp/channel.py
+++ b/amqp/channel.py
@@ -208,9 +208,11 @@ class Channel(AbstractChannel):
is the ID of the method.
"""
try:
- connection_empty = self.connection is None
- channels_empty = self.connection.channels is None
- if not self.is_open or connection_empty or channels_empty:
+ if self.connection is None:
+ return
+ if self.connection.channels is None:
+ return
+ if not self.is_open:
return
self.is_closing = True