Permalink
Browse files

Applying Satoru's patch the way he posted to the redhat bugzilla.

Signed-off-by: R. Tyler Ballance <tyler@slide.com>
  • Loading branch information...
1 parent a205bd5 commit 5bd35ae3154ea1efcfb8db703fecd0ca1b39b9a4 R. Tyler Ballance committed Mar 16, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/CacheRegion.py
View
@@ -27,7 +27,10 @@
__author__ = "Tavis Rudd <tavis@damnsimple.com> and Philippe Normand <phil@base-art.net>"
__revision__ = "$Revision: 1.3 $"[11:-2]
-import md5
+try:
+ from hashlib import md5
+except ImportError:
+ from md5 import md5
from time import time as currentTime
from Cheetah.CacheStore import MemoryCacheStore
@@ -128,7 +131,7 @@ def getCacheItem(self, cacheItemID):
Returns a `CacheItem` instance.
"""
- cacheItemID = md5.new(str(cacheItemID)).hexdigest()
+ cacheItemID = md5(str(cacheItemID)).hexdigest()
if not self._cacheItems.has_key(cacheItemID):
cacheItem = self._cacheItemClass(

0 comments on commit 5bd35ae

Please sign in to comment.