Skip to content

Commit

Permalink
build.py: Fail when ant process fails
Browse files Browse the repository at this point in the history
- Use check_call to raise CalledProcessError if somethig goes wrong
- Use a for loop instead of map()
  • Loading branch information
encukou committed Jul 6, 2013
1 parent 0b16d85 commit 2654471
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ def make_package(args):

# Build.
try:
map(lambda arg: subprocess.call([ANT, arg]), args.command)
for arg in args.command:
subprocess.check_call([ANT, arg])
except (OSError, IOError):
print 'An error occured while calling', ANT
print 'Did you install ant on your system ?'
Expand Down

0 comments on commit 2654471

Please sign in to comment.