Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KWH40
fml40-reference-implementation
Commits
9fa23bd8
Commit
9fa23bd8
authored
May 26, 2021
by
Jiahang Chen
Browse files
load json from broker callback function
parent
07d60eaa
Pipeline
#475007
passed with stages
in 51 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ml/thing.py
View file @
9fa23bd8
...
...
@@ -421,9 +421,8 @@ def __on_broker_callback(self, ch, method, properties, body):
"""
if
isinstance
(
body
,
bytes
):
body_str
=
body
.
decode
(
'utf8'
).
replace
(
"'"
,
'"'
)
try
:
body
=
json
.
loads
(
body
_str
)
body
=
json
.
loads
(
body
)
except
ValueError
:
pass
...
...
test.py
deleted
100644 → 0
View file @
07d60eaa
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment