You've already forked code_examples_server
mirror of
https://github.com/AdaCore/code_examples_server.git
synced 2026-02-12 12:45:18 -08:00
Merge pull request #16 from AdaCore/labs_IO_fix
Adding string decoding to all outputs to avoid python errors when pro…
This commit is contained in:
@@ -60,7 +60,9 @@ def json_print(pdict):
|
||||
|
||||
|
||||
def print_generic(msg, tag, lab_ref):
|
||||
obj = {"msg": msg}
|
||||
decoded_msg = msg.decode(encoding='utf-8', errors='replace')
|
||||
|
||||
obj = {"msg": decoded_msg}
|
||||
if lab_ref:
|
||||
obj["lab_ref"] = lab_ref
|
||||
json_print({tag: obj})
|
||||
|
||||
Reference in New Issue
Block a user