aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rwxr-xr-xrepsys9
2 files changed, 6 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 7eb334b..03e363c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,8 @@
- make 'repsys submit' without package name or revision number work again
- the fix for the unreleased commits problem in the previous release was
wrong, really fixed it
+- don't give the wrong message "invalid command 'CMD'" when this is not
+ the case
* 1.6.19
- added complement for SILENT: CLOG, which hides everything that does not
diff --git a/repsys b/repsys
index 7c9db57..a243493 100755
--- a/repsys
+++ b/repsys
@@ -65,11 +65,10 @@ def dispatch_command(command, argv, debug=0):
commands_module = getattr(repsys_module, "commands")
command_module = getattr(commands_module, command)
except (ImportError, AttributeError):
- if debug:
- import traceback
- traceback.print_exc()
- sys.exit(1)
- raise Error, "invalid command '%s'" % command
+ etype, exc, tb = sys.exc_info()
+ if tb.tb_next is None and not debug:
+ raise Error, "invalid command '%s'" % command
+ raise
command_module.main()
if __name__ == "__main__":