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:
Nicolas Setton
2019-07-10 13:32:36 -04:00
committed by GitHub

View File

@@ -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})