diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2023-01-22 02:02:13 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2023-01-22 02:02:13 +0100 |
commit | 86480e58eafc1fa3486e03155ed34e02b4595a24 (patch) | |
tree | 0e8f64c4003ea558e946b7a3347688904b451635 /lib/kross/python/scripts/RestrictedPython/RCompile.py | |
parent | 135d005014a1e85295af4e379f026a361537ae5f (diff) | |
download | koffice-86480e58eafc1fa3486e03155ed34e02b4595a24.tar.gz koffice-86480e58eafc1fa3486e03155ed34e02b4595a24.zip |
Drop python2 support in scripts.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'lib/kross/python/scripts/RestrictedPython/RCompile.py')
-rw-r--r-- | lib/kross/python/scripts/RestrictedPython/RCompile.py | 4 |
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 0a538657..dc5f8d4e 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 |