Merge pull request #276 from karl-johan-grahn/decode

Use decode() to convert the string to utf-8
This commit is contained in:
Michael Klishin 2020-08-27 15:20:02 +03:00 committed by GitHub
commit 5097932669
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ print(' [*] Waiting for messages. To exit press CTRL+C')
def callback(ch, method, properties, body):
print(" [x] Received %r" % body)
print(" [x] Received %r" % body.decode())
time.sleep(body.count(b'.'))
print(" [x] Done")
ch.basic_ack(delivery_tag=method.delivery_tag)