Minor fix to follow-up last refactor

This change fix the render-statistics command to use the new
timeline structure. It also update the name of the
check-all-candidacy command in the README.rst file

Change-Id: Iacf98655ce74880410125229cea623485a8d5e09
This commit is contained in:
Tristan Cacqueray 2017-01-05 01:14:34 +00:00
parent 45edfc5434
commit fdf0a40318
3 changed files with 4 additions and 5 deletions

View File

@ -33,7 +33,7 @@ When PTL Candidacy start
During the PTL Candidacy round: During the PTL Candidacy round:
* Validate candidacy, e.g.: * Validate candidacy, e.g.:
* tox -evenv -- check-new-candidacy, or * tox -evenv -- check-all-candidacies, or
* tox -evenv -- check-candidacy change_id * tox -evenv -- check-candidacy change_id
* To +2 a candidate: * To +2 a candidate:
* check commit link is indeed valid * check commit link is indeed valid

View File

@ -80,8 +80,8 @@ def main():
now = datetime.datetime.now(tz=pytz.utc) now = datetime.datetime.now(tz=pytz.utc)
now = now.replace(microsecond=0) now = now.replace(microsecond=0)
start = utils.get_event('PTL nomination starts') event = utils.get_event('PTL nomination')
end = utils.get_event('PTL nomination ends') start, end = event['start'], event['end']
duration = (end - start) duration = (end - start)
remaining = (end - now) remaining = (end - now)
progress = (duration - remaining) progress = (duration - remaining)

View File

@ -57,8 +57,7 @@ def load_exceptions():
def get_event(event_name): def get_event(event_name):
for e in conf['timeline']: for e in conf['timeline']:
if e['name'] == event_name: if e['name'] == event_name:
d = datetime.datetime.strptime(e['date'], "%Y-%m-%dT%H:%M") return e
return d.replace(tzinfo=pytz.utc)
raise ValueError("Couldn't find event_name %s" % event_name) raise ValueError("Couldn't find event_name %s" % event_name)