From: Cédric Aguerre Date: Mon, 31 Mar 2014 14:07:40 +0000 (+0200) Subject: replace subprocess wait by communicate X-Git-Tag: V7_4_0b1~4^2~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c3943b42b05ab657304b618ec0bafcb5c4d3ecd7;p=modules%2Fkernel.git replace subprocess wait by communicate --- diff --git a/bin/salomeContext.py b/bin/salomeContext.py index 424e613b6..465e6e067 100644 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -111,9 +111,10 @@ class SalomeContext: absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH','') proc = subprocess.Popen(['python', os.path.join(absoluteAppliPath,"bin","salome","salomeContext.py"), pickle.dumps(self), pickle.dumps(args)], shell=False, close_fds=True) - proc.communicate() + msg = proc.communicate() if kill: self._killAll(args) + return msg # """Append value to PATH environment variable""" @@ -291,7 +292,7 @@ class SalomeContext: absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH','') cmd = ["/bin/bash", "--rcfile", absoluteAppliPath + "/.bashrc" ] proc = subprocess.Popen(cmd, shell=False, close_fds=True) - proc.wait() + return proc.communicate() # def _runConsole(self, args=[]): @@ -302,7 +303,7 @@ class SalomeContext: cmd = ["python", "-c", "import runConsole\nrunConsole.connect()" ] proc = subprocess.Popen(cmd, shell=False, close_fds=True) - proc.wait() + return proc.communicate() # def _killAll(self, args=[]):