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:
Jeremy Stanley 2019-09-05 19:46:11 +00:00
parent cf67b3f156
commit ebcd45e865

View File

@ -65,7 +65,6 @@ def update_projects(projects_fname, candidates_list, projects):
if skip > 0:
skip -= 1
continue
line = line.decode('utf-8')
# Projects are detectable as they have no whitespace in column 0
match = re.match('^([^ \t][^:]+?):$', line)
if match:
@ -90,7 +89,7 @@ def update_projects(projects_fname, candidates_list, projects):
else:
print('Skipping %s election in progress %d candidates' %
(p, nr_candidates))
fh.write(line.encode('utf-8'))
fh.write(line)
print('Processed %d projects' % (project_count))