From 0e7cfb670b55d7ed0474ebe1d9b1cb8d9957c0a6 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Thu, 5 Sep 2019 20:27:34 +0000 Subject: [PATCH] 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 --- openstack_election/cmds/update_governance.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openstack_election/cmds/update_governance.py b/openstack_election/cmds/update_governance.py index 6b17b5d6..f9ba063d 100644 --- a/openstack_election/cmds/update_governance.py +++ b/openstack_election/cmds/update_governance.py @@ -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' +