From a34851089716744a9e8b252ff0068bc272a77b30 Mon Sep 17 00:00:00 2001 From: Steeve Morin Date: Thu, 9 Aug 2012 19:06:04 +0300 Subject: [PATCH] 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. --- kombu/transport/pika2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kombu/transport/pika2.py b/kombu/transport/pika2.py index dc212f5c..aa5ed029 100644 --- a/kombu/transport/pika2.py +++ b/kombu/transport/pika2.py @@ -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):