aboutsummaryrefslogtreecommitdiffstats
path: root/be
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2005-03-22 14:47:32 +0000
committerAaron Bentley <abentley@panoramicfeedback.com>2005-03-22 14:47:32 +0000
commitb3e66308ac5b8398d5c03bf4ce4d444797bd4486 (patch)
tree828ee3763396b87949245688473a0f2f43653428 /be
parente30304e9b3ba176dbbd9710d561d81aa4670c454 (diff)
downloadbugseverywhere-b3e66308ac5b8398d5c03bf4ce4d444797bd4486.tar.gz
Switched to exception help handling
Diffstat (limited to 'be')
-rwxr-xr-xbe8
1 files changed, 7 insertions, 1 deletions
diff --git a/be b/be
index ba6ea1c..6341729 100755
--- a/be
+++ b/be
@@ -40,9 +40,15 @@ Supported commands"""
else:
try:
try:
- execute(sys.argv[1], sys.argv[2:])
+ sys.exit(execute(sys.argv[1], sys.argv[2:]))
except KeyError, e:
raise UserError("Unknown command \"%s\"" % e.args[0])
+ except cmdutil.GetHelp:
+ print cmdutil.help(sys.argv[1])
+ sys.exit(0)
+ except cmdutil.UsageError:
+ print cmdutil.help(sys.argv[1])
+ sys.exit(1)
except UserError, e:
print e
sys.exit(1)