raise Empty() rather than returning null message

This commit is contained in:
Sam Stavinoha 2014-02-06 16:26:55 -06:00 committed by Ask Solem
parent d11ce77521
commit b112f21798
1 changed files with 1 additions and 1 deletions

View File

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