chiark / gitweb /
Prevent most commands from running when there are conflicts
[stgit] / stgit / main.py
index 663fdec35e7564071ccac54e3bfc319061f7c690..aa1f8ef891f4baf31816796cf517a340f0bbde9c 100644 (file)
@@ -281,6 +281,10 @@ def main():
         if debug_level > 0:
             traceback.print_exc()
         sys.exit(utils.STGIT_COMMAND_ERROR)
+    except SystemExit:
+        # Triggered by the option parser when it finds bad commandline
+        # parameters.
+        sys.exit(utils.STGIT_COMMAND_ERROR)
     except KeyboardInterrupt:
         sys.exit(utils.STGIT_GENERAL_ERROR)
     except: