diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-29 15:56:10 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-29 15:56:10 -0400 |
commit | dcfe9d5e292fa4a405fafb4bdd6d9e2070f30fa9 (patch) | |
tree | f9e9c8d2ba5190d1a71046cdb5fb3abdc0fcf74f /becommands/status.py | |
parent | 4e8882e74aad64859a16f17fa6bef8c04b33913d (diff) | |
parent | 22a38de80ee11ada710bc6766798ca608f938307 (diff) | |
download | bugseverywhere-dcfe9d5e292fa4a405fafb4bdd6d9e2070f30fa9.tar.gz |
Merged interactive email interface
Diffstat (limited to 'becommands/status.py')
-rw-r--r-- | becommands/status.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/becommands/status.py b/becommands/status.py index bff0626..e4db787 100644 --- a/becommands/status.py +++ b/becommands/status.py @@ -17,17 +17,17 @@ 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() >>> 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 """ @@ -36,7 +36,8 @@ def execute(args, test=False): complete(options, args, parser) if len(args) not in (1,2): raise cmdutil.UsageError - bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test) + 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 @@ -55,7 +56,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]) |