summaryrefslogtreecommitdiff
path: root/examples/complete_receive.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/complete_receive.py')
-rw-r--r--examples/complete_receive.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/complete_receive.py b/examples/complete_receive.py
index 3d9d44a9..373b74c1 100644
--- a/examples/complete_receive.py
+++ b/examples/complete_receive.py
@@ -40,9 +40,9 @@ with Connection('pyamqp://guest:guest@localhost:5672//') as connection:
#: any number of queues.
with Consumer(connection, queue, callbacks=[handle_message]):
- #: This waits for a single event. Note that this event may not
- #: be a message, or a message that is to be delivered to the consumers
- #: channel, but any event received on the connection.
- recv = eventloop(connection)
- while True:
- recv.next()
+ #: Each iteration waits for a single event. Note that this
+ #: event may not be a message, or a message that is to be
+ #: delivered to the consumers channel, but any event received
+ #: on the connection.
+ for _ in eventloop(connection):
+ pass