diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-22 14:47:32 +0000 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-22 14:47:32 +0000 |
commit | b3e66308ac5b8398d5c03bf4ce4d444797bd4486 (patch) | |
tree | 828ee3763396b87949245688473a0f2f43653428 /be | |
parent | e30304e9b3ba176dbbd9710d561d81aa4670c454 (diff) | |
download | bugseverywhere-b3e66308ac5b8398d5c03bf4ce4d444797bd4486.tar.gz |
Switched to exception help handling
Diffstat (limited to 'be')
-rwxr-xr-x | be | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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) |