The commandline option parser raises SystemExit after having explained
to the user what she did wrong. A recent refactoring introduced a
catch-all "except:" at the top level, which caught the SystemExit and
printed a traceback.
Let's just simply exit instead, like we used to.
Signed-off-by: Karl Hasselström <kha@treskal.com>
if debug_level > 0:
traceback.print_exc()
sys.exit(utils.STGIT_COMMAND_ERROR)
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:
except KeyboardInterrupt:
sys.exit(utils.STGIT_GENERAL_ERROR)
except: