Merge "Fix 'reviewers' command to make with Python3"

This commit is contained in:
Zuul 2022-04-14 15:34:35 +00:00 committed by Gerrit Code Review
commit c911f29a86
2 changed files with 3 additions and 3 deletions

View File

@ -337,7 +337,7 @@ def main(argv=None):
elif change['status'] == 'WORKINPROGRESS':
change_stats['wip'] += 1
reviewers = [(v, k) for k, v in reviewers.iteritems()
reviewers = [(v, k) for k, v in reviewers.items()
if k.lower() not in ('jenkins', 'smokestack')]
reviewers.sort(reverse=True, key=lambda r: r[0]['total'])
# Do logical processing of reviewers.

View File

@ -53,7 +53,7 @@ def get_remote_data(address, datatype='json'):
raise DataRetrievalFailed(msg)
data = ""
while True:
chunk = remote_data.read()
chunk = remote_data.read().decode('utf-8')
if not chunk:
break
data += chunk
@ -306,7 +306,7 @@ def get_changes(projects, ssh_user, ssh_key, only_open=False, stable='',
# for the sake of not having to change all the code that calls this
# function (yet, anyway).
all_changes = [value for value in all_changes.itervalues()]
all_changes = [value for value in all_changes.values()]
return all_changes