Skip to content

Commit

Permalink
build.py: Simplify execCmd()
Browse files Browse the repository at this point in the history
  • Loading branch information
cvrebert authored and sideshowbarker committed Jan 5, 2016
1 parent 4a4046d commit 0408d35
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,9 @@ def runCmd(cmd):

def execCmd(cmd, args):
print "%s %s" % (cmd, " ".join(args))
if os.name == 'nt':
if subprocess.call([cmd,] + args):
print "Command failed."
sys.exit(2)
else:
if os.execvp(cmd, [cmd,] + args):
print "Command failed."
sys.exit(2)
if subprocess.call([cmd,] + args):
print "Command failed."
sys.exit(2)

def removeIfExists(filePath):
if os.path.exists(filePath):
Expand Down

0 comments on commit 0408d35

Please sign in to comment.