From 547e19625af0aa28acd9af2131f7726813635c61 Mon Sep 17 00:00:00 2001 From: ichuang Date: Fri, 29 Jun 2012 23:09:26 -0400 Subject: [PATCH] exception as err --- common/lib/capa/inputtypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/capa/inputtypes.py b/common/lib/capa/inputtypes.py index 52ce5ddf35..a2daa3465c 100644 --- a/common/lib/capa/inputtypes.py +++ b/common/lib/capa/inputtypes.py @@ -234,7 +234,7 @@ def textbox(element, value, status, render_template, msg=''): html = render_template("textbox.html", context) try: xhtml = etree.XML(html) - except Exception,err: + except Exception as err: newmsg = 'error %s in rendering message' % (str(err).replace('<','<')) newmsg += '
Original message: %s' % msg.replace('<','<') context['msg'] = newmsg