diff --git a/README.rst b/README.rst index e26c5d61..0b3aba32 100644 --- a/README.rst +++ b/README.rst @@ -33,7 +33,7 @@ When PTL Candidacy start During the PTL Candidacy round: * Validate candidacy, e.g.: - * tox -evenv -- check-new-candidacy, or + * tox -evenv -- check-all-candidacies, or * tox -evenv -- check-candidacy change_id * To +2 a candidate: * check commit link is indeed valid diff --git a/openstack_election/cmds/render_statistics.py b/openstack_election/cmds/render_statistics.py index 98627502..9aff7d6c 100755 --- a/openstack_election/cmds/render_statistics.py +++ b/openstack_election/cmds/render_statistics.py @@ -80,8 +80,8 @@ def main(): now = datetime.datetime.now(tz=pytz.utc) now = now.replace(microsecond=0) - start = utils.get_event('PTL nomination starts') - end = utils.get_event('PTL nomination ends') + event = utils.get_event('PTL nomination') + start, end = event['start'], event['end'] duration = (end - start) remaining = (end - now) progress = (duration - remaining) diff --git a/openstack_election/utils.py b/openstack_election/utils.py index 084b2740..00fa1d86 100644 --- a/openstack_election/utils.py +++ b/openstack_election/utils.py @@ -57,8 +57,7 @@ def load_exceptions(): def get_event(event_name): for e in conf['timeline']: if e['name'] == event_name: - d = datetime.datetime.strptime(e['date'], "%Y-%m-%dT%H:%M") - return d.replace(tzinfo=pytz.utc) + return e raise ValueError("Couldn't find event_name %s" % event_name)