From eb7748d27ba148d32eecf67b0b80e62ddf87927f Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Thu, 2 Dec 2010 15:24:35 +0100 Subject: [PATCH] 2to3 says we should use a for loop here --- examples/complete_send.py | 2 +- kombu/transport/virtual/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/complete_send.py b/examples/complete_send.py index 11790590..9e3b3252 100644 --- a/examples/complete_send.py +++ b/examples/complete_send.py @@ -2,7 +2,7 @@ Example producer that sends a single message and exits. -You can use `demo_receive.py` to receive the message sent. +You can use `complete_receive.py` to receive the message sent. """ diff --git a/kombu/transport/virtual/__init__.py b/kombu/transport/virtual/__init__.py index 172b7904..210b2cf0 100644 --- a/kombu/transport/virtual/__init__.py +++ b/kombu/transport/virtual/__init__.py @@ -437,7 +437,8 @@ class Channel(AbstractChannel): """Close channel, cancel all consumers, and requeue unacked messages.""" self.closed = True - map(self.basic_cancel, list(self._consumers)) + for consumer in list(self._consumers): + self.basic_cancel(consumer) self.qos.restore_unacked_once() self.connection.close_channel(self) self._cycle = None