From 5cc562b5b82a4bffc84da9ac94c112a1342e41f1 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Tue, 10 Dec 2019 12:36:12 -0500 Subject: [PATCH] Use six to reraise a capa error. --- common/lib/capa/capa/capa_problem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/capa/capa/capa_problem.py b/common/lib/capa/capa/capa_problem.py index ee327dde52..ef3554641a 100644 --- a/common/lib/capa/capa/capa_problem.py +++ b/common/lib/capa/capa/capa_problem.py @@ -897,7 +897,7 @@ class LoncapaProblem(object): except Exception as err: log.exception("Error while execing script code: " + all_code) msg = Text("Error while executing script code: %s" % str(err)) - raise responsetypes.LoncapaProblemError(msg) + six.reraise(responsetypes.LoncapaProblemError, responsetypes.LoncapaProblemError(msg)) # Store code source in context, along with the Python path needed to run it correctly. context['script_code'] = all_code