Cosmetics

This commit is contained in:
Ask Solem 2010-10-20 15:33:41 +02:00
parent f9ea964f2e
commit b8e61373bd
1 changed files with 4 additions and 4 deletions

View File

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