get_renewees: Be compatible with older template by defining variables

Otherwise, you could end up having a KeyError while parsing a template.
And it's not a problem having too many keys defined in the dict.
This commit is contained in:
Tobias Mueller 2011-08-03 12:35:00 +02:00
parent d77211630c
commit 9b9935dbd2

View file

@ -266,6 +266,8 @@ if __name__ == "__main__":
log.warn(logmsg, lastname, firstname, email, token_or_last_renewed_on) log.warn(logmsg, lastname, firstname, email, token_or_last_renewed_on)
emailtext = template % {'firstname':firstname, 'lastname':lastname, emailtext = template % {'firstname':firstname, 'lastname':lastname,
'email': email, 'token_or_last_renewed_on': token_or_last_renewed_on, 'email': email, 'token_or_last_renewed_on': token_or_last_renewed_on,
'token': token_or_last_renewed_on,
'last_renewed_on': token_or_last_renewed_on,
} }
log.debug('The email to be sent is: %s', emailtext) log.debug('The email to be sent is: %s', emailtext)
to = email to = email