Fix queue purge in Pika 0.9.5

Queue purge, while working, was throwing an exception because message_count was not found in the Method(Frame) object. Fix that.
This commit is contained in:
Steeve Morin 2012-08-09 19:06:04 +03:00
parent 3ed2749dc4
commit a348510897
1 changed files with 2 additions and 2 deletions

View File

@ -67,8 +67,8 @@ class Channel(blocking.BlockingChannel, base.StdChannel):
return None, method, method._properties, method._body
def queue_purge(self, queue=None, nowait=False):
return super(Channel, self).queue_purge(queue=queue,
nowait=nowait).message_count
return super(Channel, self).\
queue_purge(queue=queue, nowait=nowait).method.message_count
def basic_publish(self, message, exchange, routing_key, mandatory=False,
immediate=False):