Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #12362 -- Corrected Python 2.4 incompatibility with hmac constr…

…uctor in contrib.messages. Thanks to Jeremy Dunck for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7cb8892fdb2a5437240e0d66b4eb5d1857820c41 1 parent dd27fe7
Russell Keith-Magee authored December 12, 2009
5  django/contrib/messages/storage/cookie.py
... ...
@@ -1,7 +1,7 @@
@@ -41,7 +41,6 @@ def decode(self, s, **kwargs):
@@ -103,7 +102,7 @@ def _hash(self, value):
4  django/utils/hashcompat.py
@@ -8,9 +8,13 @@
8 8
 try:
9 9
     import hashlib
10 10
     md5_constructor = hashlib.md5
  11
+    md5_hmac = md5_constructor
11 12
     sha_constructor = hashlib.sha1
  13
+    sha_hmac = sha_constructor
12 14
 except ImportError:
13 15
     import md5
14 16
     md5_constructor = md5.new
  17
+    md5_hmac = md5
15 18
     import sha
16 19
     sha_constructor = sha.new
  20
+    sha_hmac = sha

0 notes on commit 7cb8892

Please sign in to comment.
Something went wrong with that request. Please try again.