From c3943b42b05ab657304b618ec0bafcb5c4d3ecd7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Mon, 31 Mar 2014 16:07:40 +0200 Subject: [PATCH] replace subprocess wait by communicate --- bin/salomeContext.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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=[]): -- 2.39.2