--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityUtils.py Thu Apr 15 16:52:05 2021 +0200 +++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityUtils.py Thu Apr 15 18:11:24 2021 +0200 @@ -9,6 +9,7 @@ import ast import os +import contextlib import AstUtilities @@ -154,16 +155,14 @@ """ prefix = "" if isinstance(node, ast.Attribute): - try: + with contextlib.suppress(Exception): val = deepgetattr(node, 'value.id') prefix = ( aliases[val] if val in aliases else deepgetattr(node, 'value.id') ) - except Exception: # secok - # We can't get the fully qualified name for an attr, just return + # Id we can't get the fully qualified name for an attr, just return # its base name. - pass return "{0}.{1}".format(prefix, node.attr) else: