Py3K support for governance update script
Remove some string/binary conversion calls from the governance update script which were only relevant for Python 2.7. We run these under tox with a default Python 3.x interpreter now. Change-Id: Icd2c8614d2bd5b9b2a1624afdfc6e6a1512346f9
This commit is contained in:
parent
cf67b3f156
commit
ebcd45e865
@ -65,7 +65,6 @@ def update_projects(projects_fname, candidates_list, projects):
|
|||||||
if skip > 0:
|
if skip > 0:
|
||||||
skip -= 1
|
skip -= 1
|
||||||
continue
|
continue
|
||||||
line = line.decode('utf-8')
|
|
||||||
# Projects are detectable as they have no whitespace in column 0
|
# Projects are detectable as they have no whitespace in column 0
|
||||||
match = re.match('^([^ \t][^:]+?):$', line)
|
match = re.match('^([^ \t][^:]+?):$', line)
|
||||||
if match:
|
if match:
|
||||||
@ -90,7 +89,7 @@ def update_projects(projects_fname, candidates_list, projects):
|
|||||||
else:
|
else:
|
||||||
print('Skipping %s election in progress %d candidates' %
|
print('Skipping %s election in progress %d candidates' %
|
||||||
(p, nr_candidates))
|
(p, nr_candidates))
|
||||||
fh.write(line.encode('utf-8'))
|
fh.write(line)
|
||||||
|
|
||||||
print('Processed %d projects' % (project_count))
|
print('Processed %d projects' % (project_count))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user