diff options
author | Chris Ball <cjb@laptop.org> | 2009-06-24 17:25:02 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2009-06-24 17:25:02 -0400 |
commit | 4a9dde55b83b92866daae3f408c7a31e20d9e0ab (patch) | |
tree | a3853d5dae1d9426f87f1cd38fda701cfde9947d | |
parent | d99caee28aaad87750571542f20bec2de091d5a0 (diff) | |
download | bugseverywhere-4a9dde55b83b92866daae3f408c7a31e20d9e0ab.tar.gz |
Add "be target list", to show a list of existing targets.
-rw-r--r-- | becommands/target.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/becommands/target.py b/becommands/target.py index c83ffa7..e7ebcca 100644 --- a/becommands/target.py +++ b/becommands/target.py @@ -39,6 +39,12 @@ def execute(args, test=False): if len(args) not in (1, 2): raise cmdutil.UsageError bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test) + if len(args) == 1 and args[0] == "list": + ts = set([bd.bug_from_uuid(bug).target for bug in bd.list_uuids()]) + for target in sorted(ts): + if target: + print target + return bug = bd.bug_from_shortname(args[0]) if len(args) == 1: if bug.target is None or bug.target is settings_object.EMPTY: |