summaryrefslogtreecommitdiffstats
path: root/lib/kross/python/scripts/RestrictedPython/RCompile.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kross/python/scripts/RestrictedPython/RCompile.py')
-rw-r--r--lib/kross/python/scripts/RestrictedPython/RCompile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kross/python/scripts/RestrictedPython/RCompile.py b/lib/kross/python/scripts/RestrictedPython/RCompile.py
index 0a538657f..dc5f8d4e4 100644
--- a/lib/kross/python/scripts/RestrictedPython/RCompile.py
+++ b/lib/kross/python/scripts/RestrictedPython/RCompile.py
@@ -52,7 +52,7 @@ class RestrictedCompileMode(AbstractCompileMode):
tree = self.parse()
MutatingWalker.walk(tree, self.rm)
if self.rm.errors:
- raise SyntaxError, self.rm.errors[0]
+ raise SyntaxError(self.rm.errors[0])
misc.set_filename(self.filename, tree)
syntax.check(tree)
return tree
@@ -66,7 +66,7 @@ class RestrictedCompileMode(AbstractCompileMode):
def compileAndTuplize(gen):
try:
gen.compile()
- except SyntaxError, v:
+ except SyntaxError as v:
return None, (str(v),), gen.rm.warnings, gen.rm.used_names
return gen.getCode(), (), gen.rm.warnings, gen.rm.used_names