aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--becommands/list.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/becommands/list.py b/becommands/list.py
index d92ebac..94ca10a 100644
--- a/becommands/list.py
+++ b/becommands/list.py
@@ -24,15 +24,16 @@ def execute(args):
my_bugs = []
other_bugs = []
unassigned_bugs = []
- for bug in bugs:
- if tree.target is not None and bug.target != tree.target:
- continue
- if bug.assigned == current_id:
- my_target_bugs.append(bug)
- elif bug.assigned is None:
- unassigned_target_bugs.append(bug)
- else:
- other_target_bugs.append(bug)
+ if tree.target is not None:
+ for bug in bugs:
+ if bug.target != tree.target:
+ continue
+ if bug.assigned == current_id:
+ my_target_bugs.append(bug)
+ elif bug.assigned is None:
+ unassigned_target_bugs.append(bug)
+ else:
+ other_target_bugs.append(bug)
for bug in bugs:
if tree.target is not None and bug.target == tree.target: