diff options
author | Allan Douglas R. de Oliveira <allan@chaordicsystems.com> | 2014-05-04 20:36:51 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-05-04 20:36:51 -0700 |
commit | bcb9b7fd4a656f9a6741220a6623441567ded0a4 (patch) | |
tree | 05b1b6214fad9747dd950b0411a7ca441935080a | |
parent | d940e4c16aaa7b60daf1229a99bc4d3455c0240d (diff) | |
download | spark-bcb9b7fd4a656f9a6741220a6623441567ded0a4.tar.gz spark-bcb9b7fd4a656f9a6741220a6623441567ded0a4.tar.bz2 spark-bcb9b7fd4a656f9a6741220a6623441567ded0a4.zip |
EC2 script should exit with non-zero code on UsageError
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
-rwxr-xr-x | ec2/spark_ec2.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py index db393748a3..0f6d5a1fa8 100755 --- a/ec2/spark_ec2.py +++ b/ec2/spark_ec2.py @@ -814,6 +814,7 @@ def main(): real_main() except UsageError, e: print >> stderr, "\nError:\n", e + sys.exit(1) if __name__ == "__main__": |