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/list.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/list.py')
-rw-r--r-- | becommands/list.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/becommands/list.py b/becommands/list.py index 5ba1821..12e1e29 100644 --- a/becommands/list.py +++ b/becommands/list.py @@ -26,16 +26,17 @@ __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() + >>> bd = bugdir.SimpleBugDir() >>> 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 + >>> bd.cleanup() """ parser = get_parser() options, args = parser.parse_args(args) @@ -46,11 +47,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: |