diff options
Diffstat (limited to 'libbe/command/list.py')
-rw-r--r-- | libbe/command/list.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libbe/command/list.py b/libbe/command/list.py index 4bb9c7b..6d4fcd8 100644 --- a/libbe/command/list.py +++ b/libbe/command/list.py @@ -135,11 +135,11 @@ class List (libbe.command.Command): extra_strings_regexps=extra_strings_regexps) bugs = list(itertools.chain(*list( [bugdir.bug_from_uuid(uuid) for uuid in bugdir.uuids()] - for bugdir in bugdirs.values()))) - bugs = [b for b in bugs if filter(bugdirs, b) == True] + for bugdir in list(bugdirs.values())))) + bugs = [b for b in bugs if list(filter(bugdirs, b)) == True] self.result = bugs if len(bugs) == 0 and params['xml'] == False: - print >> self.stdout, 'No matching bugs found' + print('No matching bugs found', file=self.stdout) # sort bugs bugs = self._sort_bugs(bugs, cmp_list) @@ -147,7 +147,7 @@ class List (libbe.command.Command): # print list of bugs if params['ids'] == True: for bug in bugs: - print >> self.stdout, bug.id.user() + print(bug.id.user(), file=self.stdout) else: self._list_bugs(bugs, show_tags=params['tags'], xml=params['xml']) storage.writeable = writeable @@ -194,13 +194,12 @@ class List (libbe.command.Command): def _list_bugs(self, bugs, show_tags=False, xml=False): if xml == True: - print >> self.stdout, \ - '<?xml version="1.0" encoding="%s" ?>' % self.stdout.encoding - print >> self.stdout, '<be-xml>' + print('<?xml version="1.0" encoding="%s" ?>' % self.stdout.encoding, file=self.stdout) + print('<be-xml>', file=self.stdout) if len(bugs) > 0: for bug in bugs: if xml == True: - print >> self.stdout, bug.xml(show_comments=True) + print(bug.xml(show_comments=True), file=self.stdout) else: bug_string = bug.string(shortlist=True) if show_tags == True: @@ -210,9 +209,9 @@ class List (libbe.command.Command): % (attrs, ','.join(libbe.command.tag.get_tags(bug)), summary)) - print >> self.stdout, bug_string + print(bug_string, file=self.stdout) if xml == True: - print >> self.stdout, '</be-xml>' + print('</be-xml>', file=self.stdout) def _long_help(self): return """ |