From 86480e58eafc1fa3486e03155ed34e02b4595a24 Mon Sep 17 00:00:00 2001 From: Slávek Banko Date: Sun, 22 Jan 2023 02:02:13 +0100 Subject: Drop python2 support in scripts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- lib/kross/python/scripts/RestrictedPython/RestrictionMutator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/kross/python/scripts/RestrictedPython/RestrictionMutator.py') diff --git a/lib/kross/python/scripts/RestrictedPython/RestrictionMutator.py b/lib/kross/python/scripts/RestrictedPython/RestrictionMutator.py index a8b3850e0..d5f4bac02 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): -- cgit v1.2.3