Commit f45dc949 by jmclaus

JavascriptResponse i18n. [BLD-737]

parent eceb8318
......@@ -543,7 +543,9 @@ class JavascriptResponse(LoncapaResponse):
# Node.js code is un-sandboxed. If the LoncapaSystem says we aren't
# allowed to run unsafe code, then stop now.
if not self.capa_system.can_execute_unsafe_code():
raise LoncapaProblemError("Execution of unsafe Javascript code is not allowed.")
_ = self.capa_system.i18n.ugettext
msg = _("Execution of unsafe Javascript code is not allowed.")
raise LoncapaProblemError(msg)
subprocess_args = ["node"]
subprocess_args.extend(args)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment