summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2012-11-08 20:20:41 +0000
committerAsk Solem <ask@celeryproject.org>2012-11-08 20:20:41 +0000
commit7f9b38ff8bd59540f5304fbe391fd0987b48c805 (patch)
tree63090b99d6372d6dbff13e4a75c724f9f6e0f4ed /examples
parent3405974b5f9cac6fd0f664cca52f7b1af8e47fcf (diff)
downloadkombu-7f9b38ff8bd59540f5304fbe391fd0987b48c805.tar.gz
[kombu3] No longer supports Python 2.5
Diffstat (limited to 'examples')
-rw-r--r--examples/complete_receive.py3
-rw-r--r--examples/complete_send.py2
-rw-r--r--examples/simple_eventlet_receive.py2
-rw-r--r--examples/simple_eventlet_send.py2
-rw-r--r--examples/simple_receive.py3
-rw-r--r--examples/simple_send.py2
-rw-r--r--examples/simple_task_queue/client.py2
-rw-r--r--examples/simple_task_queue/worker.py4
8 files changed, 1 insertions, 19 deletions
diff --git a/examples/complete_receive.py b/examples/complete_receive.py
index d7c8e948..3d9d44a9 100644
--- a/examples/complete_receive.py
+++ b/examples/complete_receive.py
@@ -2,9 +2,6 @@
Example of simple consumer that waits for a single message, acknowledges it
and exits.
"""
-
-from __future__ import with_statement
-
from kombu import Connection, Exchange, Queue, Consumer, eventloop
from pprint import pformat
diff --git a/examples/complete_send.py b/examples/complete_send.py
index c81f8620..337083c1 100644
--- a/examples/complete_send.py
+++ b/examples/complete_send.py
@@ -5,8 +5,6 @@ Example producer that sends a single message and exits.
You can use `complete_receive.py` to receive the message sent.
"""
-from __future__ import with_statement
-
from kombu import Connection, Producer, Exchange, Queue
#: By default messages sent to exchanges are persistent (delivery_mode=2),
diff --git a/examples/simple_eventlet_receive.py b/examples/simple_eventlet_receive.py
index 1f88e713..d70126df 100644
--- a/examples/simple_eventlet_receive.py
+++ b/examples/simple_eventlet_receive.py
@@ -6,8 +6,6 @@ You can use `simple_receive.py` (or `complete_receive.py`) to receive the
message sent.
"""
-from __future__ import with_statement
-
import eventlet
from Queue import Empty
diff --git a/examples/simple_eventlet_send.py b/examples/simple_eventlet_send.py
index f6259bf3..1ba87fbf 100644
--- a/examples/simple_eventlet_send.py
+++ b/examples/simple_eventlet_send.py
@@ -6,8 +6,6 @@ You can use `simple_receive.py` (or `complete_receive.py`) to receive the
message sent.
"""
-from __future__ import with_statement
-
import eventlet
from kombu import Connection
diff --git a/examples/simple_receive.py b/examples/simple_receive.py
index e9b933b1..e15427e3 100644
--- a/examples/simple_receive.py
+++ b/examples/simple_receive.py
@@ -1,9 +1,6 @@
"""
Example receiving a message using the SimpleQueue interface.
"""
-
-from __future__ import with_statement
-
from kombu import Connection
#: Create connection
diff --git a/examples/simple_send.py b/examples/simple_send.py
index e76fbcf0..3b3f236e 100644
--- a/examples/simple_send.py
+++ b/examples/simple_send.py
@@ -6,8 +6,6 @@ You can use `simple_receive.py` (or `complete_receive.py`) to receive the
message sent.
"""
-from __future__ import with_statement
-
from kombu import Connection
#: Create connection
diff --git a/examples/simple_task_queue/client.py b/examples/simple_task_queue/client.py
index fe0a512b..8ed33f36 100644
--- a/examples/simple_task_queue/client.py
+++ b/examples/simple_task_queue/client.py
@@ -1,5 +1,3 @@
-from __future__ import with_statement
-
from kombu.common import maybe_declare
from kombu.pools import producers
diff --git a/examples/simple_task_queue/worker.py b/examples/simple_task_queue/worker.py
index be241140..807542e9 100644
--- a/examples/simple_task_queue/worker.py
+++ b/examples/simple_task_queue/worker.py
@@ -1,5 +1,3 @@
-from __future__ import with_statement
-
from kombu.mixins import ConsumerMixin
from kombu.log import get_logger
from kombu.utils import kwdict, reprcall
@@ -25,7 +23,7 @@ class Worker(ConsumerMixin):
logger.info('Got task: %s', reprcall(fun.__name__, args, kwargs))
try:
fun(*args, **kwdict(kwargs))
- except Exception, exc:
+ except Exception as exc:
logger.error('task raised exception: %r', exc)
message.ack()