Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 5bd35ae3154ea1efcfb8db703fecd0ca1b39b9a4 1 parent a205bd5
R. Tyler Ballance authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/CacheRegion.py
View
7 src/CacheRegion.py
@@ -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(
Please sign in to comment.
Something went wrong with that request. Please try again.