Commit 9fa23bd8 authored by Jiahang Chen's avatar Jiahang Chen
Browse files

load json from broker callback function

parent 07d60eaa
Pipeline #475007 passed with stages
in 51 seconds
...@@ -421,9 +421,8 @@ def __on_broker_callback(self, ch, method, properties, body): ...@@ -421,9 +421,8 @@ def __on_broker_callback(self, ch, method, properties, body):
""" """
if isinstance(body, bytes): if isinstance(body, bytes):
body_str = body.decode('utf8').replace("'", '"')
try: try:
body = json.loads(body_str) body = json.loads(body)
except ValueError: except ValueError:
pass pass
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment