8000 build.py: Fail when ant process fails · germn/python-for-android@2654471 · GitHub
[go: up one dir, main page]

Skip to content
  • Commit 2654471

    Browse files
    committed
    build.py: Fail when ant process fails
    - Use check_call to raise CalledProcessError if somethig goes wrong - Use a for loop instead of map()
    1 parent 0b16d85 commit 2654471

    File tree

    1 file changed

    +2
    -1
    lines changed

    1 file changed

    +2
    -1
    lines changed

    src/build.py

    Lines changed: 2 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -325,7 +325,8 @@ def make_package(args):
    325325

    326326
    # Build.
    327327
    try:
    328-
    map(lambda arg: subprocess.call([ANT, arg]), args.command)
    328+
    for arg in args.command:
    329+
    subprocess.check_call([ANT, arg])
    329330
    except (OSError, IOError):
    330331
    print 'An error occured while calling', ANT
    331332
    print 'Did you install ant on your system ?'

    0 commit comments

    Comments
     (0)
    0