summaryrefslogtreecommitdiff
path: root/cpp/makebindist.py
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/makebindist.py')
-rwxr-xr-xcpp/makebindist.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/makebindist.py b/cpp/makebindist.py
index 7a9cb484945..ea6b8db4a59 100755
--- a/cpp/makebindist.py
+++ b/cpp/makebindist.py
@@ -28,10 +28,11 @@ class ExtProgramError:
def __str__(self):
return repr(self.msg)
-def runprog(commandstring):
- commandtuple = commandstring.split()
- result = os.spawnvpe(os.P_WAIT, commandtuple[0], commandtuple, os.environ)
- if result != 0:
+def runprog(commandstring, haltOnError = True):
+ #commandtuple = commandstring.split()
+ #result = os.spawnvpe(os.P_WAIT, commandtuple[0], commandtuple, os.environ)
+ result = os.system(commandstring)
+ if result != 0 and haltOnError:
msg = 'Command %s failed with error code %d' % (commandstring, result)
raise ExtProgramError(msg)