Skip to content

Commit e7f9021

Browse files
committed
Handle expiring the last call of status change documents. Be more robust about errors when expiring last calls. Fixes ietf-tools#1911. Commit ready for merge.
- Legacy-Id: 10811
1 parent a07b318 commit e7f9021

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

ietf/bin/expire-last-calls

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ from ietf.doc.lastcall import *
1414

1515
drafts = get_expired_last_calls()
1616
for doc in drafts:
17-
expire_last_call(doc)
18-
syslog.syslog("Expired last call for %s (id=%s)" % (doc.file_tag(), doc.pk))
17+
try:
18+
expire_last_call(doc)
19+
syslog.syslog("Expired last call for %s (id=%s)" % (doc.file_tag(), doc.pk))
20+
except Exception as e:
21+
syslog.syslog(syslog.LOG_ERR, "ERROR: Failed to expire last call for %s (id=%s)" % (doc.file_tag(), doc.pk))

ietf/doc/mails.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,9 @@ def extra_automation_headers(doc):
357357
return extra
358358

359359
def email_last_call_expired(doc):
360-
text = "IETF Last Call has ended, and the state has been changed to\n%s." % doc.get_state("draft-iesg").name
360+
if not doc.type_id in ['draft','statchg']:
361+
return
362+
text = "IETF Last Call has ended, and the state has been changed to\n%s." % doc.get_state("draft-iesg" if doc.type_id == 'draft' else "statchg").name
361363
addrs = gather_address_lists('last_call_expired',doc=doc)
362364

363365
send_mail(None,

0 commit comments

Comments
 (0)