Replace empty IRC nicks in governance updates

In order to make the governance updates consistent with how empty
IRC nicks were indicated in projects.yaml previously, replace empty
values with the string "No nick supplied" instead.

Change-Id: I67cf2586f300dc65a23c80fef7d142bbe00eaafb
This commit is contained in:
Jeremy Stanley 2019-09-05 20:27:34 +00:00
parent e57d8da921
commit 0e7cfb670b

View File

@ -77,13 +77,16 @@ def update_projects(projects_fname, candidates_list, projects):
# where there is no candidate
candidates = [{
'fullname': 'APPOINTMENT NEEDED',
'ircname': 'No nick supplied',
'ircname': '',
'email': 'example@example.org',
}]
print('TC to appoint PTL for %s' % (p))
nr_candidates = len(candidates)
# Only update the PTL if there is a single candidate
if nr_candidates == 1:
# Replace empty IRC nick strings with something useful
if not candidates[0]['ircname']:
candidates[0]['ircname'] = 'No nick supplied'
line += ((' ptl:\n' +
' name: %(fullname)s\n' +
' irc: %(ircname)s\n' +