render-wiki-list: Only remove the TC if needed
If the TC election hasn't been opened then render-wiki-list will fail with: --- Traceback (most recent call last): File "tools/render-wiki-list.py", line 31, in <module> main(sys.argv) File "tools/render-wiki-list.py", line 17, in main candidates_list['projects'].remove('TC') ValueError: list.remove(x): x not in list --- Fix that Change-Id: I5292655d14871b2b3047be0d2720423acfdab9e3
This commit is contained in:
parent
f013acfaa0
commit
5fdebb419c
@ -14,6 +14,7 @@ def main(argv):
|
|||||||
candidates_list = build_candidates_list("newton")
|
candidates_list = build_candidates_list("newton")
|
||||||
|
|
||||||
if argv[1] == "PTL":
|
if argv[1] == "PTL":
|
||||||
|
if 'TC' in candidates_list['projects']:
|
||||||
candidates_list['projects'].remove('TC')
|
candidates_list['projects'].remove('TC')
|
||||||
else:
|
else:
|
||||||
candidates_list['projects'] = ['TC']
|
candidates_list['projects'] = ['TC']
|
||||||
|
Loading…
Reference in New Issue
Block a user