--- a/ext/tal.py Thu Feb 14 15:39:23 2013 +0100
+++ b/ext/tal.py Thu Feb 14 15:38:25 2013 +0100
@@ -182,7 +182,7 @@
""" Internally used when expanding a template that is part of a context."""
try:
interpreter.execute(self)
- except UnicodeError, unierror:
+ except UnicodeError as unierror:
LOGGER.exception(str(unierror))
raise simpleTALES.ContextContentException("found non-unicode %r string in Context!" % unierror.args[1]), None, sys.exc_info()[-1]
@@ -230,7 +230,7 @@
# XXX precompile expr will avoid late syntax error
try:
result = eval(expr, globals, locals)
- except Exception, ex:
+ except Exception as ex:
ex = ex.__class__('in %r: %s' % (expr, ex))
raise ex, None, sys.exc_info()[-1]
if (isinstance (result, simpleTALES.ContextVariable)):