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/list.py | |
parent | 4e8882e74aad64859a16f17fa6bef8c04b33913d (diff) | |
parent | 22a38de80ee11ada710bc6766798ca608f938307 (diff) | |
download | bugseverywhere-dcfe9d5e292fa4a405fafb4bdd6d9e2070f30fa9.tar.gz |
Merged interactive email interface
Diffstat (limited to 'becommands/list.py')
-rw-r--r-- | becommands/list.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/becommands/list.py b/becommands/list.py index 5ba1821..50038e6 100644 --- a/becommands/list.py +++ b/becommands/list.py @@ -26,14 +26,14 @@ __desc__ = __doc__ AVAILABLE_CMPS = [fn[4:] for fn in dir(bug) if fn[:4] == 'cmp_'] AVAILABLE_CMPS.remove("attr") # a cmp_* template. -def execute(args, test=False): +def execute(args, manipulate_encodings=True): """ >>> import os >>> bd = bugdir.simple_bug_dir() >>> os.chdir(bd.root) - >>> execute([], test=True) + >>> execute([], manipulate_encodings=False) a:om: Bug A - >>> execute(["--status", "all"], test=True) + >>> execute(["--status", "all"], manipulate_encodings=False) a:om: Bug A b:cm: Bug B """ @@ -46,11 +46,13 @@ def execute(args, test=False): if options.sort_by != None: for cmp in options.sort_by.split(','): if cmp not in AVAILABLE_CMPS: - raise cmdutil.UserError("Invalid sort on '%s'.\nValid sorts:\n %s" - % (cmp, '\n '.join(AVAILABLE_CMPS))) + raise cmdutil.UserError( + "Invalid sort on '%s'.\nValid sorts:\n %s" + % (cmp, '\n '.join(AVAILABLE_CMPS))) cmp_list.append(eval('bug.cmp_%s' % cmp)) - bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test) + bd = bugdir.BugDir(from_disk=True, + manipulate_encodings=manipulate_encodings) bd.load_all_bugs() # select status if options.status != None: |