Skip to content

Commit

Permalink
fix: Fix import and try/else logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jan 24, 2022
1 parent b56482f commit ea7c37e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yapw/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class Client(clients.Threaded, clients.Durable, clients.Blocking, clients.Base):
from typing import Any, Callable, List, Optional, Set, Tuple

import pika
import pika.exceptions
from pika.exchange_type import ExchangeType

from yapw.decorators import default_decode, halt
Expand Down Expand Up @@ -327,7 +328,7 @@ def consume(
for thread in threads:
thread.join()
# The connection is already closed.
except Exception:
else:
for thread in threads:
thread.join()
self.connection.close()
Expand Down

0 comments on commit ea7c37e

Please sign in to comment.