Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Quite the deprecation warnings under Python 2.6 and upwards o…

…n the use of the md5 module"

This is stupid, why not just apply Satoru's patch?

This reverts commit ef3d0c7.
  • Loading branch information...
commit a205bd50a1948dd8a26b14d7be8ce669d221f226 1 parent 9c3d926
R. Tyler Ballance authored
Showing with 3 additions and 11 deletions.
  1. +3 −11 src/CacheRegion.py
View
14 src/CacheRegion.py
@@ -27,15 +27,7 @@
__author__ = "Tavis Rudd <tavis@damnsimple.com> and Philippe Normand <phil@base-art.net>"
__revision__ = "$Revision: 1.3 $"[11:-2]
-try:
- import hashlib
- def md5digest(material):
- return hashlib.md5(material).digest()
-except ImportError:
- import md5
- def md5digest(material):
- return md5.new(material).hexdigest()
-
+import md5
from time import time as currentTime
from Cheetah.CacheStore import MemoryCacheStore
@@ -136,8 +128,8 @@ def getCacheItem(self, cacheItemID):
Returns a `CacheItem` instance.
"""
- cacheItemID = md5digest(str(cacheItemID))
-
+ cacheItemID = md5.new(str(cacheItemID)).hexdigest()
+
if not self._cacheItems.has_key(cacheItemID):
cacheItem = self._cacheItemClass(
cacheItemID=cacheItemID, cacheStore=self._wrappedCacheDataStore)
Please sign in to comment.
Something went wrong with that request. Please try again.