diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-12-12 05:25:50 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-12-12 05:25:50 +0000 |
| commit | 7cb8892fdb2a5437240e0d66b4eb5d1857820c41 (patch) | |
| tree | 0cd3fe57d73a9c05903d9ce36ddd8493f82ac86a /django/utils/hashcompat.py | |
| parent | dd27fe74c7546e01e32438579a8db575e8f097ce (diff) | |
Fixed #12362 -- Corrected Python 2.4 incompatibility with hmac constructor 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
Diffstat (limited to 'django/utils/hashcompat.py')
| -rw-r--r-- | django/utils/hashcompat.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/django/utils/hashcompat.py b/django/utils/hashcompat.py index 8880d92646..b1e6021890 100644 --- a/django/utils/hashcompat.py +++ b/django/utils/hashcompat.py @@ -8,9 +8,13 @@ available. try: import hashlib md5_constructor = hashlib.md5 + md5_hmac = md5_constructor sha_constructor = hashlib.sha1 + sha_hmac = sha_constructor except ImportError: import md5 md5_constructor = md5.new + md5_hmac = md5 import sha sha_constructor = sha.new + sha_hmac = sha |
