Merge "Minor fix to follow-up last refactor"

This commit is contained in:
Jenkins 2017-01-05 04:18:08 +00:00 committed by Gerrit Code Review
commit d499e16ea6
3 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)