From b112f21798d98e6a9d700fbabb79cb43b57edae0 Mon Sep 17 00:00:00 2001 From: Sam Stavinoha Date: Thu, 6 Feb 2014 16:26:55 -0600 Subject: [PATCH] raise Empty() rather than returning null message --- kombu/transport/redis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kombu/transport/redis.py b/kombu/transport/redis.py index 0511bd53..13dc073e 100644 --- a/kombu/transport/redis.py +++ b/kombu/transport/redis.py @@ -570,9 +570,9 @@ class Channel(virtual.Channel): try: message = loads(bytes_to_str(payload['data'])) except (TypeError, ValueError): - message = None warn('Cannot process event on channel %r: %r', channel, payload, exc_info=1) + raise Empty() return message, self._fanout_to_queue[channel] raise Empty()