aboutsummaryrefslogtreecommitdiffstats
path: root/becommands
diff options
context:
space:
mode:
Diffstat (limited to 'becommands')
-rw-r--r--becommands/target.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/becommands/target.py b/becommands/target.py
index c83ffa7..f18b0c0 100644
--- a/becommands/target.py
+++ b/becommands/target.py
@@ -36,9 +36,16 @@ def execute(args, test=False):
options, args = parser.parse_args(args)
cmdutil.default_complete(options, args, parser,
bugid_args={0: lambda bug : bug.active==True})
+
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 and isinstance(target,str):
+ 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: