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:
parent
45edfc5434
commit
fdf0a40318
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user