Skip to content
Snippets Groups Projects
Verified Commit 5d38b950 authored by Xavier Robin's avatar Xavier Robin
Browse files

fix: support for Python < 3.10

parent f04f0859
Branches
Tags
No related merge requests found
...@@ -635,7 +635,8 @@ def _Main(): ...@@ -635,7 +635,8 @@ def _Main():
out = dict() out = dict()
out["status"] = "FAILURE" out["status"] = "FAILURE"
out["traceback"] = traceback.format_exc(limit=1000) out["traceback"] = traceback.format_exc(limit=1000)
out["exception"] = " ".join(traceback.format_exception_only(exc)) etype, evalue, tb = sys.exc_info()
out["exception"] = " ".join(traceback.format_exception_only(etype, evalue))
with open(args.output, 'w') as fh: with open(args.output, 'w') as fh:
json.dump(out, fh, indent=4, sort_keys=False) json.dump(out, fh, indent=4, sort_keys=False)
raise raise
......
...@@ -903,7 +903,8 @@ def _Main(): ...@@ -903,7 +903,8 @@ def _Main():
out = dict() out = dict()
out["status"] = "FAILURE" out["status"] = "FAILURE"
out["traceback"] = traceback.format_exc() out["traceback"] = traceback.format_exc()
out["exception"] = " ".join(traceback.format_exception_only(exc)) etype, evalue, tb = sys.exc_info()
out["exception"] = " ".join(traceback.format_exception_only(etype, evalue))
with open(args.output, 'w') as fh: with open(args.output, 'w') as fh:
json.dump(out, fh, indent=4, sort_keys=False) json.dump(out, fh, indent=4, sort_keys=False)
raise raise
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment