--- a/eric6/DebugClients/Python/QProcessExtension.py Sat Feb 15 16:30:08 2020 +0100 +++ b/eric6/DebugClients/Python/QProcessExtension.py Sat Feb 15 20:00:22 2020 +0100 @@ -78,7 +78,7 @@ mode = args[0] else: mode = module.QIODevice.ReadWrite - ok, (program, arguments) = isPythonProgram(program, arguments) + ok = isPythonProgram(program) if ( ok and ( not os.path.basename(arguments[0]) @@ -86,12 +86,14 @@ ) ): newArgs = patchArguments( - arguments, _debugClient.multiprocessSupport) - super(QProcessWrapper, self).start(program, newArgs, mode) - else: - super(QProcessWrapper, self).start(*args, **kwargs) - else: - super(QProcessWrapper, self).start(*args, **kwargs) + _debugClient, + [program] + arguments, + ) + super(QProcessWrapper, self).start( + newArgs[0], newArgs[1:], mode) + return + + super(QProcessWrapper, self).start(*args, **kwargs) ################################################################### ## Handling of 'startDetached(...)' below @@ -142,16 +144,12 @@ arguments = self.arguments() wd = self.workingDirectory() - ok, (program, arguments) = isPythonProgram(program, arguments) + ok = isPythonProgram(program) if ok: return QProcessWrapper.startDetachedStatic( program, arguments, wd) - else: - return super(QProcessWrapper, self).startDetached( - *args, **kwargs) - else: - return super(QProcessWrapper, self).startDetached( - *args, **kwargs) + + return super(QProcessWrapper, self).startDetached(*args, **kwargs) @staticmethod def startDetachedStatic(*args, **kwargs): @@ -180,18 +178,17 @@ wd = args[2] else: wd = "" - ok, (program, arguments) = isPythonProgram(program, arguments) + ok = isPythonProgram(program) if ok: newArgs = patchArguments( - arguments, _debugClient.multiprocessSupport) - return QProcessWrapper._origQProcessStartDetached( - program, newArgs, wd) - else: + _debugClient, + [program] + arguments, + ) return QProcessWrapper._origQProcessStartDetached( - *args, **kwargs) - else: - return QProcessWrapper._origQProcessStartDetached( - *args, **kwargs) + newArgs[0], newArgs[1:], wd) + + return QProcessWrapper._origQProcessStartDetached( + *args, **kwargs) _debugClient = debugClient module.QProcess = QProcessWrapper