mirror of https://github.com/celery/kombu.git
Cosmetics
This commit is contained in:
parent
f9ea964f2e
commit
b8e61373bd
|
@ -366,11 +366,11 @@ class Consumer(object):
|
||||||
try:
|
try:
|
||||||
decoded = message.payload
|
decoded = message.payload
|
||||||
except Exception, exc:
|
except Exception, exc:
|
||||||
if self.on_decode_error:
|
if not self.on_decode_error:
|
||||||
return self.on_decode_error(message, exc)
|
|
||||||
else:
|
|
||||||
raise
|
raise
|
||||||
self.receive(decoded, message)
|
self.on_decode_error(message, exc)
|
||||||
|
else:
|
||||||
|
self.receive(decoded, message)
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
self.consume()
|
self.consume()
|
||||||
|
|
Loading…
Reference in New Issue