From b8e61373bdd48ea45e47f55da01de0cc51674192 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Wed, 20 Oct 2010 15:33:41 +0200 Subject: [PATCH] Cosmetics --- kombu/messaging.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kombu/messaging.py b/kombu/messaging.py index e3ef3dd7..43362741 100644 --- a/kombu/messaging.py +++ b/kombu/messaging.py @@ -366,11 +366,11 @@ class Consumer(object): try: decoded = message.payload except Exception, exc: - if self.on_decode_error: - return self.on_decode_error(message, exc) - else: + if not self.on_decode_error: raise - self.receive(decoded, message) + self.on_decode_error(message, exc) + else: + self.receive(decoded, message) def __enter__(self): self.consume()