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/RestrictionMutator.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/RestrictionMutator.py')
-rw-r--r-- | lib/kross/python/scripts/RestrictedPython/RestrictionMutator.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kross/python/scripts/RestrictedPython/RestrictionMutator.py b/lib/kross/python/scripts/RestrictedPython/RestrictionMutator.py index a8b3850e..d5f4bac0 100644 --- a/lib/kross/python/scripts/RestrictedPython/RestrictionMutator.py +++ b/lib/kross/python/scripts/RestrictedPython/RestrictionMutator.py @@ -26,7 +26,7 @@ from SelectCompiler import ast, parse, OP_ASSIGN, OP_DELETE, OP_APPLY # trees without affecting line numbers shown in tracebacks, etc. def rmLineno(node): """Strip lineno attributes from a code tree.""" - if node.__dict__.has_key('lineno'): + if 'lineno' in node.__dict__: del node.lineno for child in node.getChildren(): if isinstance(child, ast.Node): |