From 0a9aeb77b0c2548bde2697cd636ada4faf63c297 Mon Sep 17 00:00:00 2001 From: Nate Coraor <nate@bx.psu.edu> Date: Thu, 10 Sep 2015 13:53:08 -0400 Subject: [PATCH] Fix a couple flake8 errors including a supposed PEP-8 violation that is actually a PEP-8-suggested acceptable option of how to handle the offending situation. =P --- pulsar/client/amqp_exchange.py | 4 ++-- pulsar/client/util.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pulsar/client/amqp_exchange.py b/pulsar/client/amqp_exchange.py index 65b1e801..bde9b36e 100644 --- a/pulsar/client/amqp_exchange.py +++ b/pulsar/client/amqp_exchange.py @@ -105,7 +105,7 @@ class PulsarExchange(object): # queue once before the ack manager starts doing its # thing if self.acks_enabled and queue_name.endswith(ACK_QUEUE_SUFFIX): - ack_manager_thread = self.__start_ack_manager(queue_name) + self.__start_ack_manager(queue_name) while check and connection.connected: try: connection.drain_events(timeout=self.__timeout) @@ -184,7 +184,7 @@ class PulsarExchange(object): publish_log_prefix = self.__publish_log_prefex(transaction_uuid) log.debug("%sBegin publishing to key %s", publish_log_prefix, key) if (self.acks_enabled and not name.endswith(ACK_QUEUE_SUFFIX) - and ACK_FORCE_NOACK_KEY not in payload): + and ACK_FORCE_NOACK_KEY not in payload): # Publishing a message on a normal queue and it's not a republish # (or explicitly forced do-not-ack), so add ack keys ack_uuid = str(transaction_uuid) diff --git a/pulsar/client/util.py b/pulsar/client/util.py index ae382c17..35696bef 100644 --- a/pulsar/client/util.py +++ b/pulsar/client/util.py @@ -262,7 +262,7 @@ class MessageQueueUUIDStore(object): raise def keys(self): - return iter(os.listdir(self.__store)) + return iter(listdir(self.__store)) def get_time(self, key): try: -- GitLab