summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorC Anthony Risinger <anthony+corvisa.com@xtfx.me>2012-07-30 15:16:37 -0500
committerAsk Solem <ask@celeryproject.org>2012-08-01 16:05:38 +0100
commit96091915c47bb424b89167413e74f4337e0117e0 (patch)
treee0e21acb62dba07b9aa454b4f839cc935d21b139
parentad422cf049d622eda55f0092f28a5ede70c20a9d (diff)
downloadkombu-96091915c47bb424b89167413e74f4337e0117e0.tar.gz
[issue #149] transport/librabbitmq: KeyError prevents further handling
Kombu ordinarily sets the `content_type` and `content_encoding` standard AMQP properties; in the event a message enters circulation *without* these headers, Kombu triggers a KeyError, and enters an unrecoverable loop precluding user handlers from ever reviewing, or even *recieving* the message.
-rw-r--r--kombu/transport/librabbitmq.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kombu/transport/librabbitmq.py b/kombu/transport/librabbitmq.py
index 62baec96..0dc8e416 100644
--- a/kombu/transport/librabbitmq.py
+++ b/kombu/transport/librabbitmq.py
@@ -39,9 +39,9 @@ class Message(base.Message):
body=body,
delivery_info=info,
properties=props,
- delivery_tag=info['delivery_tag'],
- content_type=props['content_type'],
- content_encoding=props['content_encoding'],
+ delivery_tag=info.get('delivery_tag'),
+ content_type=props.get('content_type'),
+ content_encoding=props.get('content_encoding'),
headers=props.get('headers'))