src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/injectionShell.py

branch
eric7
changeset 10883
1fe731ca7078
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
--- a/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/injectionShell.py	Fri Aug 02 19:12:15 2024 +0200
+++ b/src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/Checks/injectionShell.py	Fri Aug 02 19:24:32 2024 +0200
@@ -285,7 +285,7 @@
         node = context.node.args[0]
 
         # some calls take an arg list, check the first part
-        if isinstance(node, ast.List):
+        if isinstance(node, ast.List) and node.elts:
             node = node.elts[0]
 
         # make sure the param is a string literal and not a var name

eric ide

mercurial