Skip to content

Commit

Permalink
EC2 script should exit with non-zero code on UsageError
Browse files Browse the repository at this point in the history
This is specially import because some ssh errors are raised as UsageError, preventing an automated usage of the script from detecting the failure.

Author: Allan Douglas R. de Oliveira <allan@chaordicsystems.com>

Closes #638 from douglaz/ec2_exit_code_fix and squashes the following commits:

5915e6d [Allan Douglas R. de Oliveira] EC2 script should exit with non-zero code on UsageError
(cherry picked from commit bcb9b7f)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>
  • Loading branch information
Allan Douglas R. de Oliveira authored and pwendell committed May 5, 2014
1 parent ec0bce1 commit 7305278
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ec2/spark_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ def main():
real_main()
except UsageError, e:
print >> stderr, "\nError:\n", e
sys.exit(1)


if __name__ == "__main__":
Expand Down

0 comments on commit 7305278

Please sign in to comment.