Fri, 17 Nov 2023 14:00:05 +0100
Fixed a multi process debug issue related to Windows platforms.
src/eric7/DebugClients/Python/MultiProcessDebugExtension.py | file | annotate | diff | comparison | revisions |
--- a/src/eric7/DebugClients/Python/MultiProcessDebugExtension.py Thu Nov 16 18:10:59 2023 +0100 +++ b/src/eric7/DebugClients/Python/MultiProcessDebugExtension.py Fri Nov 17 14:00:05 2023 +0100 @@ -152,7 +152,8 @@ """ Function replacing the 'spawnl' functions of the os module. """ - args = patchArguments(_debugClient, args) + if _shallPatch(): + args = patchArguments(_debugClient, args) return getattr(os, originalName)(mode, path, *args) return newSpawnl @@ -177,7 +178,8 @@ """ Function replacing the 'spawnv' functions of the os module. """ - args = patchArguments(_debugClient, args) + if _shallPatch(): + args = patchArguments(_debugClient, args) return getattr(os, originalName)(mode, path, args) return newSpawnv @@ -202,7 +204,8 @@ """ Function replacing the 'spawnve' functions of the os module. """ - args = patchArguments(_debugClient, args) + if _shallPatch(): + args = patchArguments(_debugClient, args) return getattr(os, originalName)(mode, path, args, env) return newSpawnve @@ -229,7 +232,8 @@ """ Function replacing the 'posix_spawn' functions of the os module. """ - argv = patchArguments(_debugClient, argv) + if _shallPatch(): + argv = patchArguments(_debugClient, argv) return getattr(os, originalName)(path, argv, env, **kwargs) return newPosixSpawn @@ -362,9 +366,9 @@ import _subprocess # __IGNORE_WARNING_I10__ except ImportError: import _winapi as _subprocess # __IGNORE_WARNING_I10__ - return getattr(_subprocess, originalName)( - appName, patchArgumentStringWindows(_debugClient, cmdline), *args - ) + if _shallPatch(): + cmdline = patchArgumentStringWindows(_debugClient, cmdline) + return getattr(_subprocess, originalName)(appName, cmdline, *args) return newCreateProcess