aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command/depend.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/command/depend.py')
-rw-r--r--libbe/command/depend.py37
1 files changed, 17 insertions, 20 deletions
diff --git a/libbe/command/depend.py b/libbe/command/depend.py
index 0040cf3..4cb0efd 100644
--- a/libbe/command/depend.py
+++ b/libbe/command/depend.py
@@ -211,10 +211,9 @@ class Depend (libbe.command.Command):
bugdirs, repair_broken_links=True)
assert len(broken) == 0, broken
if len(fixed) > 0:
- print >> self.stdout, 'Fixed the following links:'
- print >> self.stdout, \
- '\n'.join(['%s |-- %s' % (blockee.id.user(), blocker.id.user())
- for blockee,blocker in fixed])
+ print('Fixed the following links:', file=self.stdout)
+ print('\n'.join(['%s |-- %s' % (blockee.id.user(), blocker.id.user())
+ for blockee,blocker in fixed]), file=self.stdout)
return 0
status = parse_status(params['status'])
severity = parse_severity(params['severity'])
@@ -227,19 +226,19 @@ class Depend (libbe.command.Command):
if params['tree-depth'] != None:
dtree = DependencyTree(bugdirs, bugA, params['tree-depth'], filter)
if len(dtree.blocked_by_tree()) > 0:
- print >> self.stdout, '%s blocked by:' % bugA.id.user()
+ print('%s blocked by:' % bugA.id.user(), file=self.stdout)
for depth,node in dtree.blocked_by_tree().thread():
if depth == 0: continue
- print >> self.stdout, (
+ print((
'%s%s'
- % (' '*(depth), self.bug_string(node.bug, params)))
+ % (' '*(depth), self.bug_string(node.bug, params))), file=self.stdout)
if len(dtree.blocks_tree()) > 0:
- print >> self.stdout, '%s blocks:' % bugA.id.user()
+ print('%s blocks:' % bugA.id.user(), file=self.stdout)
for depth,node in dtree.blocks_tree().thread():
if depth == 0: continue
- print >> self.stdout, (
+ print((
'%s%s'
- % (' '*(depth), self.bug_string(node.bug, params)))
+ % (' '*(depth), self.bug_string(node.bug, params))), file=self.stdout)
return 0
if params['blocking-bug-id'] != None:
@@ -254,16 +253,14 @@ class Depend (libbe.command.Command):
blocked_by = get_blocked_by(bugdirs, bugA)
if len(blocked_by) > 0:
- print >> self.stdout, '%s blocked by:' % bugA.id.user()
- print >> self.stdout, \
- '\n'.join([self.bug_string(_bug, params)
- for _bug in blocked_by])
+ print('%s blocked by:' % bugA.id.user(), file=self.stdout)
+ print('\n'.join([self.bug_string(_bug, params)
+ for _bug in blocked_by]), file=self.stdout)
blocks = get_blocks(bugdirs, bugA)
if len(blocks) > 0:
- print >> self.stdout, '%s blocks:' % bugA.id.user()
- print >> self.stdout, \
- '\n'.join([self.bug_string(_bug, params)
- for _bug in blocks])
+ print('%s blocks:' % bugA.id.user(), file=self.stdout)
+ print('\n'.join([self.bug_string(_bug, params)
+ for _bug in blocks]), file=self.stdout)
return 0
def bug_string(self, _bug, params):
@@ -410,13 +407,13 @@ def check_dependencies(bugdirs, repair_broken_links=False):
[]
>>> bugdir.cleanup()
"""
- for bugdir in bugdirs.values():
+ for bugdir in list(bugdirs.values()):
if bugdir.storage is not None:
bugdir.load_all_bugs()
good_links = []
fixed_links = []
broken_links = []
- for bugdir in bugdirs.values():
+ for bugdir in list(bugdirs.values()):
for bug in bugdir:
for blocker in get_blocked_by(bugdirs, bug):
blocks = get_blocks(bugdirs, blocker)