changeset 3601:148669312bf8

fix hmac for python 2.4
author Johannes Berg <johannes AT sipsolutions DOT net>
date Wed, 14 May 2008 21:39:27 +0200
parents a37683c62c52
children 3b265efc5eb2
files MoinMoin/user.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/user.py	Tue May 13 01:52:44 2008 +0200
+++ b/MoinMoin/user.py	Wed May 14 21:39:27 2008 +0200
@@ -1021,7 +1021,7 @@
     def generate_recovery_token(self):
         key = random_string(64, "abcdefghijklmnopqrstuvwxyz0123456789")
         msg = str(int(time.time()))
-        h = hmac.new(key, msg, sha.new).hexdigest()
+        h = hmac.new(key, msg, sha).hexdigest()
         self.recoverpass_key = key
         self.save()
         return msg + '-' + h