From 7305278a0e2a376320154f68f7c0b6876c65916a Mon Sep 17 00:00:00 2001 From: "Allan Douglas R. de Oliveira" Date: Sun, 4 May 2014 20:36:51 -0700 Subject: [PATCH] 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 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 --- ec2/spark_ec2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py index 6d6335f359162..d2def7a97da5c 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__":