edit processManager demo

This commit is contained in:
Bastian Schroll 2019-10-09 20:10:49 +02:00
parent 2da9bfbe0c
commit c4b9f54df6
2 changed files with 19 additions and 10 deletions

View file

@ -32,6 +32,9 @@ class ProcessManager:
self._processHandle = None
self._textMode = textMode
def __del__(self):
self.stop()
def addArgument(self, arg):
"""!add a new argument
@ -44,7 +47,7 @@ class ProcessManager:
"""!clear all arguments"""
self._args = self._args[0:1] # kept first element (process name)
def start(self, startAsShell=False):
def start(self):
"""!start the new process
@return: True or False"""
@ -55,7 +58,7 @@ class ProcessManager:
stdout=self._stdout,
stderr=self._stderr,
universal_newlines=self._textMode,
shell=startAsShell)
shell=False)
if not self.isRunning:
logging.error("cannot start")
return False