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:37:04 -0700 |
commit | 7305278a0e2a376320154f68f7c0b6876c65916a (patch) | |
tree | 66f1519321a68a9316b9a132efba1110e4c79dfd /ec2 | |
parent | ec0bce10de180b8276a9344b1217cfda271bbdcf (diff) | |
download | spark-7305278a0e2a376320154f68f7c0b6876c65916a.tar.gz spark-7305278a0e2a376320154f68f7c0b6876c65916a.tar.bz2 spark-7305278a0e2a376320154f68f7c0b6876c65916a.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
(cherry picked from commit bcb9b7fd4a656f9a6741220a6623441567ded0a4)
Signed-off-by: Patrick Wendell <pwendell@gmail.com>
Diffstat (limited to 'ec2')
-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 6d6335f359..d2def7a97d 100755 --- a/ec2/spark_ec2.py +++ b/ec2/spark_ec2.py @@ -815,6 +815,7 @@ def main(): real_main() except UsageError, e: print >> stderr, "\nError:\n", e + sys.exit(1) if __name__ == "__main__": |