Fix 'reviewers' command to make with Python3
Change-Id: I9716ed3f629d54f1a4e82dc64bf65a0702af6a25
This commit is contained in:
parent
7be58d6af8
commit
98e27f513d
@ -337,7 +337,7 @@ def main(argv=None):
|
|||||||
elif change['status'] == 'WORKINPROGRESS':
|
elif change['status'] == 'WORKINPROGRESS':
|
||||||
change_stats['wip'] += 1
|
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')]
|
if k.lower() not in ('jenkins', 'smokestack')]
|
||||||
reviewers.sort(reverse=True, key=lambda r: r[0]['total'])
|
reviewers.sort(reverse=True, key=lambda r: r[0]['total'])
|
||||||
# Do logical processing of reviewers.
|
# Do logical processing of reviewers.
|
||||||
|
@ -53,7 +53,7 @@ def get_remote_data(address, datatype='json'):
|
|||||||
raise DataRetrievalFailed(msg)
|
raise DataRetrievalFailed(msg)
|
||||||
data = ""
|
data = ""
|
||||||
while True:
|
while True:
|
||||||
chunk = remote_data.read()
|
chunk = remote_data.read().decode('utf-8')
|
||||||
if not chunk:
|
if not chunk:
|
||||||
break
|
break
|
||||||
data += chunk
|
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
|
# for the sake of not having to change all the code that calls this
|
||||||
# function (yet, anyway).
|
# function (yet, anyway).
|
||||||
|
|
||||||
all_changes = [value for value in all_changes.itervalues()]
|
all_changes = [value for value in all_changes.values()]
|
||||||
|
|
||||||
return all_changes
|
return all_changes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user