Commit f4280377 by Tim Babych

Do not print exception message below stacktrace

parent 4477c285
......@@ -221,7 +221,7 @@ class InputTypeBase(object):
self.status = state.get('status', 'unanswered')
try:
# Pre-parse and propcess all the declared requirements.
# Pre-parse and process all the declared requirements.
self.process_requirements()
# Call subclass "constructor" -- means they don't have to worry about calling
......
......@@ -249,7 +249,11 @@ class CapaMixin(CapaFields):
# e.g. in the CMS
msg = u'<p>{msg}</p>'.format(msg=cgi.escape(msg))
msg += u'<p><pre>{tb}</pre></p>'.format(
tb=cgi.escape(traceback.format_exc()))
# just the traceback, no message - it is already present above
tb=cgi.escape(
u''.join(['Traceback (most recent call last):\n'] +
traceback.format_tb(sys.exc_info()[2])))
)
# create a dummy problem with error message instead of failing
problem_text = (u'<problem><text><span class="inline-error">'
u'Problem {url} has an error:</span>{msg}</text></problem>'.format(
......
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