eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/tryExcept.py

branch
maintenance
changeset 8273
698ae46f40a4
parent 8259
2bbec88047dd
equal deleted inserted replaced
8190:fb0ef164f536 8273:698ae46f40a4
45 @param context security context object 45 @param context security context object
46 @type SecurityContext 46 @type SecurityContext
47 @param config dictionary with configuration data 47 @param config dictionary with configuration data
48 @type dict 48 @type dict
49 """ 49 """
50 if config and "check_typed_exception" in config: 50 checkTypedException = (
51 checkTypedException = config["check_typed_exception"] 51 config["check_typed_exception"]
52 else: 52 if config and "check_typed_exception" in config else
53 checkTypedException = SecurityDefaults["check_typed_exception"] 53 SecurityDefaults["check_typed_exception"]
54 )
54 55
55 node = context.node 56 node = context.node
56 if len(node.body) == 1: 57 if len(node.body) == 1:
57 if ( 58 if (
58 not checkTypedException and 59 not checkTypedException and
80 @param context security context object 81 @param context security context object
81 @type SecurityContext 82 @type SecurityContext
82 @param config dictionary with configuration data 83 @param config dictionary with configuration data
83 @type dict 84 @type dict
84 """ 85 """
85 if config and "check_typed_exception" in config: 86 checkTypedException = (
86 checkTypedException = config["check_typed_exception"] 87 config["check_typed_exception"]
87 else: 88 if config and "check_typed_exception" in config else
88 checkTypedException = SecurityDefaults["check_typed_exception"] 89 SecurityDefaults["check_typed_exception"]
90 )
89 91
90 node = context.node 92 node = context.node
91 if len(node.body) == 1: 93 if len(node.body) == 1:
92 if ( 94 if (
93 not checkTypedException and 95 not checkTypedException and

eric ide

mercurial