diff options
author | W. Trevor King <wking@drexel.edu> | 2008-11-24 18:29:16 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2008-11-24 18:29:16 -0500 |
commit | a711ecf10df62e30d83c1941065404c53fecd35b (patch) | |
tree | 4111ef606fa52dc7f21ca3eb357ff83fae74fe1e /be | |
parent | c5d7551e6a6e98bb6da7c7d11360224edfda2f14 (diff) | |
parent | 2c3f6c066ceb03ae3579dff029bf01f0b62c1f82 (diff) | |
download | bugseverywhere-a711ecf10df62e30d83c1941065404c53fecd35b.tar.gz |
Merge from W. Trevor King's tree.
Diffstat (limited to 'be')
-rwxr-xr-x | be | 37 |
1 files changed, 6 insertions, 31 deletions
@@ -17,50 +17,25 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -from libbe.cmdutil import * -from libbe.bugdir import tree_root, create_bug_dir -from libbe import names, plugin, cmdutil import sys -import os -import becommands.severity -import becommands.list -import becommands.show -import becommands.set_root -import becommands.new -import becommands.close -import becommands.open -import becommands.inprogress -__doc__ = """Bugs Everywhere - Distributed bug tracking - -Supported becommands - set-root: assign the root directory for bug tracking - new: Create a new bug - list: list bugs - show: show a particular bug - close: close a bug - open: re-open a bug - severity: %s - -Unimplemented becommands - comment: append a comment to a bug -""" % becommands.severity.__desc__ - +from libbe import cmdutil +__doc__ == cmdutil.help() if len(sys.argv) == 1 or sys.argv[1] in ('--help', '-h'): - cmdutil.print_command_list() + print cmdutil.help() else: try: try: - sys.exit(execute(sys.argv[1], sys.argv[2:])) + sys.exit(cmdutil.execute(sys.argv[1], sys.argv[2:])) except KeyError, e: - raise UserError("Unknown command \"%s\"" % e.args[0]) + raise cmdutil.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: + except cmdutil.UserError, e: print e sys.exit(1) |