From 51e58956dc9f2af95461b8ff219f094e6e00402a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 13 May 2012 14:48:48 -0400 Subject: [PATCH] Use defaults appropriately. Bail out on failed command. --- coverity-submit | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/coverity-submit b/coverity-submit index 1fac603..9ce8c0c 100755 --- a/coverity-submit +++ b/coverity-submit @@ -53,10 +53,14 @@ else: die("Every project requires an email option.") if config.has_option(project, "upload"): upload = config.get(project, "upload") +elif config.has_option("DEFAULT", "upload"): + upload = config.get("DEFAULT", "upload") else: die("Every project requires an upload option.") if config.has_option(project, "advertise"): advertise = config.get(project, "advertise") +elif config.has_option("DEFAULT", "advertise"): + upload = config.get("DEFAULT", "advertise") else: die("Every project requires an advertise option.") if config.has_option(project, "prebuild"): @@ -81,6 +85,7 @@ def do_or_die(cmd): if not noexec: if os.system(cmd) != 0: sys.stderr.write("Command failed.\n") + sys.exit(1) # Build local stuff print("Rebuilding and scanning...") -- 2.43.0