src/eric7/DebugClients/Python/SubprocessExtension.py

branch
eric7
changeset 10627
40b3df5b933a
parent 10439
21c28b0f9e41
child 10633
dda7e43934dc
diff -r 42c3c948aafa -r 40b3df5b933a src/eric7/DebugClients/Python/SubprocessExtension.py
--- a/src/eric7/DebugClients/Python/SubprocessExtension.py	Mon Mar 04 18:16:19 2024 +0100
+++ b/src/eric7/DebugClients/Python/SubprocessExtension.py	Wed Mar 06 09:36:09 2024 +0100
@@ -37,13 +37,13 @@
         Wrapper class for subprocess.Popen.
         """
 
-        def __init__(self, arguments, *args, **kwargs):
+        def __init__(self, args, *popenargs, **kwargs):
             """
             Constructor
 
-            @param arguments command line arguments for the new process
+            @param args command line arguments for the new process
             @type list of str or str
-            @param args constructor arguments of Popen
+            @param popenargs constructor arguments of Popen
             @type list
             @param kwargs constructor keyword only arguments of Popen
             @type dict
@@ -51,30 +51,30 @@
             if (
                 _debugClient.debugging
                 and _debugClient.multiprocessSupport
-                and isinstance(arguments, (str, list))
+                and isinstance(args, (str, list))
             ):
-                if isinstance(arguments, str):
+                if isinstance(args, str):
                     # convert to arguments list
-                    arguments = (
-                        stringToArgumentsWindows(arguments)
+                    args = (
+                        stringToArgumentsWindows(args)
                         if isWindowsPlatform()
-                        else shlex.split(arguments)
+                        else shlex.split(args)
                     )
                 else:
                     # create a copy of the arguments
-                    arguments = arguments[:]
-                ok = isPythonProgram(arguments[0])
+                    args = args[:]
+                ok = isPythonProgram(args[0])
                 if ok:
-                    scriptName = os.path.basename(arguments[0])
+                    scriptName = os.path.basename(args[0])
                     if not _debugClient.skipMultiProcessDebugging(scriptName):
-                        arguments = patchArguments(
-                            _debugClient, arguments, noRedirect=True
+                        args = patchArguments(
+                            _debugClient, args, noRedirect=True
                         )
                     if "shell" in kwargs and kwargs["shell"] is True:
                         # shell=True interferes with eric debugger
                         kwargs["shell"] = False
 
-            super().__init__(arguments, *args, **kwargs)
+            super().__init__(args, *popenargs, **kwargs)
 
     _debugClient = debugClient
     module.Popen = PopenWrapper

eric ide

mercurial