diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2022-03-04 17:38:01 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2022-03-04 17:38:01 +0000 |
commit | 524fa81d71d335a04ab3610c39c5c8e74eb732a4 (patch) | |
tree | 699260f2fece94510f4d61c366091d1b5f91ba2a /reflect.py | |
parent | 92f710554dac6fb75e0c3b4bcf4a0305ee4df4c3 (diff) | |
download | Smarker-524fa81d71d335a04ab3610c39c5c8e74eb732a4.tar.gz Smarker-524fa81d71d335a04ab3610c39c5c8e74eb732a4.zip |
started work on templating for tex
Diffstat (limited to 'reflect.py')
-rw-r--r-- | reflect.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -260,8 +260,9 @@ def gen_reflection_report(client_code_path, assessment_struct, student_no, confi out["files"][i][required_file]["exception"] = {} out["files"][i][required_file]["exception"]["type"] = str(type(e)) out["files"][i][required_file]["exception"]["str"] = str(e) - # TODO: work out how to only get the exception stack of the client code - out["files"][i][required_file]["exception"]["traceback"] = ''.join(traceback.format_exception(None, e, e.__traceback__)) + # TODO: test this indexing so we can be sure we're getting client code only + e_list = traceback.format_exception(None, e, e.__traceback__) + out["files"][i][required_file]["exception"]["traceback"] = ''.join([e_list[0]] + e_list[12:]) continue |