Skip to content

Commit b46c692

Browse files
committed
Python 3 preparation: convert exec to a function.
Tool-generated patch.
1 parent 3cc71e3 commit b46c692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roundup/cgi/PageTemplates/PythonExpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __init__(self, name, expr, engine):
3131
self.expr = expr = expr.strip().replace('\n', ' ')
3232
try:
3333
d = {}
34-
exec 'def f():\n return %s\n' % expr.strip() in d
34+
exec('def f():\n return %s\n' % expr.strip(), d)
3535
self._f = d['f']
3636
except:
3737
raise CompilerError(('Python expression error:\n'

0 commit comments

Comments
 (0)