Skip to content

Commit

Permalink
Remove catching AttributError (#531)
Browse files Browse the repository at this point in the history
I'm not sure why this is here. I tested with both a force disconnect and shutting down RabbitMQ underneath the connection and neither hit this code path.
  • Loading branch information
gmr committed Apr 29, 2015
1 parent 41ea5ea commit e7b6d73
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pika/adapters/blocking_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ def process_data_events(self):
try:
if self._handle_read():
self._socket_timeouts = 0
except AttributeError:
raise exceptions.ConnectionClosed()
except socket.timeout:
self._handle_timeout()
self._flush_outbound()
Expand Down Expand Up @@ -504,7 +502,7 @@ def basic_cancel(self, consumer_tag='', nowait=False):
nowait=nowait), self._on_cancelok, replies)

def basic_get(self, queue=None, no_ack=False):
"""Get a single message from the AMQP broker. Returns a set with the
"""Get a single message from the AMQP broker. Returns a set with the
method frame, header frame and body.
:param queue: The queue to get a message from
Expand All @@ -528,7 +526,7 @@ def basic_publish(self, exchange, routing_key, body,
mandatory=False,
immediate=False):
"""Publish to the channel with the given exchange, routing key and body.
Returns a boolean value indicating the success of the operation. For
Returns a boolean value indicating the success of the operation. For
more information on basic_publish and what the parameters do, see:
http://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.publish
Expand Down

1 comment on commit e7b6d73

@vitaly-krugl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for removing it. I meant to do it in one of my PRs, but forgot

Please sign in to comment.