aboutsummaryrefslogtreecommitdiffstats
path: root/be
diff options
context:
space:
mode:
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)