only write the candidate list page when the election is in progress

This is a partial fix for the fact that the candidate list does not
appear in any toctree. It disables generating the list page so that
outside of election season (like now) we can enable the sphinx flag to
treat warnings as errors.

Change-Id: Icc308470b660a7336efe5f648ac28233efadad80
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-11-06 08:50:02 -05:00
parent f02357456e
commit 63f41dd8b2

View File

@ -96,12 +96,13 @@ def build_archive(serie, list_type):
def build_lists(app):
# Current candidates
candidates_list = utils.build_candidates_list()
if not utils.is_tc_election():
render_list("ptl", candidates_list)
else:
render_list("tc", candidates_list)
if utils.election_is_running():
# Current candidates
candidates_list = utils.build_candidates_list()
if not utils.is_tc_election():
render_list("ptl", candidates_list)
else:
render_list("tc", candidates_list)
# Archived elections
previous_toc = [