diff options
author | Chris Ball <cjb@laptop.org> | 2009-10-05 23:15:39 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2009-10-05 23:15:39 -0400 |
commit | b6a50c703369467132876f21efa8e4ffc672afae (patch) | |
tree | 905a9ae34efa2bce47d754893093b016d18d0162 /becommands/status.py | |
parent | 6a639574fa95e50f82fa3052e5524b961295a7ab (diff) | |
parent | e35ccf95ea89b6e622202caae30d3b8cca3f2473 (diff) | |
download | bugseverywhere-b6a50c703369467132876f21efa8e4ffc672afae.tar.gz |
Large merge from W. Trevor King, including Gianluca's HTML export.
Diffstat (limited to 'becommands/status.py')
-rw-r--r-- | becommands/status.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/becommands/status.py b/becommands/status.py index edc948d..f315003 100644 --- a/becommands/status.py +++ b/becommands/status.py @@ -17,27 +17,29 @@ from libbe import cmdutil, bugdir, bug __desc__ = __doc__ -def execute(args, test=False): +def execute(args, manipulate_encodings=True): """ >>> import os - >>> bd = bugdir.simple_bug_dir() + >>> bd = bugdir.SimpleBugDir() >>> os.chdir(bd.root) - >>> execute(["a"], test=True) + >>> execute(["a"], manipulate_encodings=False) open - >>> execute(["a", "closed"], test=True) - >>> execute(["a"], test=True) + >>> execute(["a", "closed"], manipulate_encodings=False) + >>> execute(["a"], manipulate_encodings=False) closed - >>> execute(["a", "none"], test=True) + >>> execute(["a", "none"], manipulate_encodings=False) Traceback (most recent call last): UserError: Invalid status: none + >>> bd.cleanup() """ parser = get_parser() options, args = parser.parse_args(args) complete(options, args, parser) if len(args) not in (1,2): raise cmdutil.UsageError - bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test) - bug = bd.bug_from_shortname(args[0]) + bd = bugdir.BugDir(from_disk=True, + manipulate_encodings=manipulate_encodings) + bug = cmdutil.bug_from_shortname(bd, args[0]) if len(args) == 1: print bug.status else: @@ -55,7 +57,8 @@ def get_parser(): def help(): try: # See if there are any per-tree status configurations - bd = bugdir.BugDir(from_disk=True, manipulate_encodings=False) + bd = bugdir.BugDir(from_disk=True, + manipulate_encodings=False) except bugdir.NoBugDir, e: pass # No tree, just show the defaults longest_status_len = max([len(s) for s in bug.status_values]) |