aboutsummaryrefslogtreecommitdiffstats
path: root/repsys
diff options
context:
space:
mode:
Diffstat (limited to 'repsys')
-rwxr-xr-xrepsys9
1 files changed, 4 insertions, 5 deletions
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__":