fixed bare except flake8 error by adding KeyError

This commit is contained in:
Asif Saif Uddin 2018-11-27 16:59:42 +06:00 committed by GitHub
parent 7ed7df0ca1
commit 01ab1a7f59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ class Channel(virtual.Channel):
def _message_to_python(self, message, queue_name, queue):
try:
body = base64.b64decode(message['Body'].encode())
except:
except KeyError:
body = message['Body'].encode()
payload = loads(bytes_to_str(body))
if queue_name in self._noack_queues: