src/eric7/DebugClients/Python/MultiProcessDebugExtension.py

branch
eric7
changeset 9586
2750e76fc366
parent 9571
0e2ab682dfa3
child 9653
e67609152c5e
diff -r 2b4bbdaa0ff9 -r 2750e76fc366 src/eric7/DebugClients/Python/MultiProcessDebugExtension.py
--- a/src/eric7/DebugClients/Python/MultiProcessDebugExtension.py	Wed Dec 07 11:40:38 2022 +0100
+++ b/src/eric7/DebugClients/Python/MultiProcessDebugExtension.py	Wed Dec 07 11:49:36 2022 +0100
@@ -71,10 +71,9 @@
         """
         Function replacing the 'execl' functions of the os module.
         """
-        if _shallPatch():
-            if isPythonProgram(args[0]):
-                args = patchArguments(_debugClient, args)
-                path = args[0]
+        if _shallPatch() and isPythonProgram(args[0]):
+            args = patchArguments(_debugClient, args)
+            path = args[0]
         return getattr(os, originalName)(path, *args)
 
     return newExecl
@@ -99,10 +98,9 @@
         """
         Function replacing the 'execv' functions of the os module.
         """
-        if _shallPatch():
-            if isPythonProgram(args[0]):
-                args = patchArguments(_debugClient, args)
-                path = args[0]
+        if _shallPatch() and isPythonProgram(args[0]):
+            args = patchArguments(_debugClient, args)
+            path = args[0]
         return getattr(os, originalName)(path, args)
 
     return newExecv
@@ -127,10 +125,9 @@
         """
         Function replacing the 'execve' functions of the os module.
         """
-        if _shallPatch():
-            if isPythonProgram(args[0]):
-                args = patchArguments(_debugClient, args)
-                path = args[0]
+        if _shallPatch() and isPythonProgram(args[0]):
+            args = patchArguments(_debugClient, args)
+            path = args[0]
         return getattr(os, originalName)(path, args, env)
 
     return newExecve

eric ide

mercurial