From 3d21f93dd33cd0bc2c5ca1c5d6570d781795e6cd Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Tue, 7 Sep 2010 20:52:51 +0000 Subject: [PATCH] Use os.system instead of Popen, since it doesn't need the full path on unix. --- build/commands.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/build/commands.py b/build/commands.py index c11d6094..2deba7fb 100644 --- a/build/commands.py +++ b/build/commands.py @@ -183,15 +183,9 @@ class InternalCommands: def persist_cmake(self): # even though we're running `cmake --version`, we're only doing this for the 0 return # code; we don't care about the version, since CMakeLists worrys about this for us. - p = subprocess.Popen( - [self.cmake_cmd, '--version'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - shell=True) - - stdout, stderr = p.communicate() + err = os.system('%s --version' % self.cmake_cmd) - if p.returncode != 0: + if err != 0: # if return code from cmake is not 0, then either something has # gone terribly wrong with --version, or it genuinely doesn't exist. print ('Could not find `%s` in system path.\n'