]> thyrsus.com Git - coverity-submit.git/commitdiff
Use defaults appropriately. Bail out on failed command.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 13 May 2012 18:48:48 +0000 (14:48 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 13 May 2012 18:48:48 +0000 (14:48 -0400)
coverity-submit

index 1fac603edde077a6d09983c07a32006e91f7f41e..9ce8c0c053664c6ad9b51fa7b6194b27f22485d3 100755 (executable)
@@ -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...")