mirror of https://github.com/celery/kombu.git
fixed bare except flake8 error by adding KeyError
This commit is contained in:
parent
7ed7df0ca1
commit
01ab1a7f59
|
@ -221,7 +221,7 @@ class Channel(virtual.Channel):
|
||||||
def _message_to_python(self, message, queue_name, queue):
|
def _message_to_python(self, message, queue_name, queue):
|
||||||
try:
|
try:
|
||||||
body = base64.b64decode(message['Body'].encode())
|
body = base64.b64decode(message['Body'].encode())
|
||||||
except:
|
except KeyError:
|
||||||
body = message['Body'].encode()
|
body = message['Body'].encode()
|
||||||
payload = loads(bytes_to_str(body))
|
payload = loads(bytes_to_str(body))
|
||||||
if queue_name in self._noack_queues:
|
if queue_name in self._noack_queues:
|
||||||
|
|
Loading…
Reference in New Issue