[foundation-web] get_renewees: Be compatible with older template by defining variables



commit 9b9935dbd26075f7c83430f303241049da16ca15
Author: Tobias Mueller <tobiasmue gnome org>
Date:   Wed Aug 3 12:35:00 2011 +0200

    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 files changed, 2 insertions(+), 0 deletions(-)
---
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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]