aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command/target.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/command/target.py')
-rw-r--r--libbe/command/target.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/libbe/command/target.py b/libbe/command/target.py
index 9f76303..0886fbf 100644
--- a/libbe/command/target.py
+++ b/libbe/command/target.py
@@ -101,15 +101,15 @@ class Target (libbe.command.Command):
if params['bugdir']:
bugdir = bugdirs[params['bugdir']]
elif len(bugdirs) == 1:
- bugdir = bugdirs.values()[0]
+ bugdir = list(bugdirs.values())[0]
else:
raise libbe.command.UserError(
'Ambiguous bugdir {}'.format(sorted(bugdirs.values())))
bug = bug_from_target_summary(bugdirs, bugdir, params['target'])
if bug == None:
- print >> self.stdout, 'No target assigned.'
+ print('No target assigned.', file=self.stdout)
else:
- print >> self.stdout, bug.id.long_user()
+ print(bug.id.long_user(), file=self.stdout)
return 0
bugdir,bug,comment = (
libbe.command.util.bugdir_bug_comment_from_user_id(
@@ -117,9 +117,9 @@ class Target (libbe.command.Command):
if params['target'] == None:
target = bug_target(bugdirs, bug)
if target == None:
- print >> self.stdout, 'No target assigned.'
+ print('No target assigned.', file=self.stdout)
else:
- print >> self.stdout, target.summary
+ print(target.summary, file=self.stdout)
else:
if params['target'] == 'none':
target = remove_target(bugdirs, bug)
@@ -204,7 +204,7 @@ def add_target(bugdirs, bugdir, bug, summary):
def targets(bugdirs):
"""Generate all possible target bug summaries."""
- for bugdir in bugdirs.values():
+ for bugdir in list(bugdirs.values()):
bugdir.load_all_bugs()
for bug in bugdir:
if bug.severity == 'target':