[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.
This commit is contained in:
C Anthony Risinger 2012-07-30 15:16:37 -05:00
parent 5456a6bbeb
commit 6cf7857250
1 changed files with 3 additions and 3 deletions

View File

@ -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'))