From 9b9935dbd26075f7c83430f303241049da16ca15 Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Wed, 3 Aug 2011 12:35:00 +0200 Subject: [PATCH] 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. --- bin/get_renewees.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/get_renewees.py b/bin/get_renewees.py index 16f9a7e..9190f66 100755 --- a/bin/get_renewees.py +++ b/bin/get_renewees.py @@ -266,6 +266,8 @@ if __name__ == "__main__": log.warn(logmsg, lastname, firstname, email, token_or_last_renewed_on) emailtext = template % {'firstname':firstname, 'lastname':lastname, '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) to = email