diff MoinMoin/action/cache.py @ 4376:eda647742453

merged moin/1.8
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 05 Oct 2008 00:38:07 +0200
parents c2ee4633b9e8 817d99d715fe
children 5ad5753ae311
line wrap: on
line diff
--- a/MoinMoin/action/cache.py	Sat Oct 04 19:01:19 2008 +0200
+++ b/MoinMoin/action/cache.py	Sun Oct 05 00:38:07 2008 +0200
@@ -27,8 +27,6 @@
     @license: GNU GPL, see COPYING for details.
 """
 
-import hmac, sha
-
 from MoinMoin import log
 logging = log.getLogger(__name__)
 
@@ -39,6 +37,7 @@
 from MoinMoin import config, caching
 from MoinMoin.util import filesys
 from MoinMoin.action import AttachFile
+from MoinMoin.support.python_compatibility import hmac_new
 
 action_name = __name__.split('.')[-1]
 
@@ -98,7 +97,7 @@
         raise AssertionError('cache_key called with unsupported parameters')
 
     hmac_data = hmac_data.encode('utf-8')
-    key = hmac.new(secret, hmac_data, sha).hexdigest()
+    key = hmac_new(secret, hmac_data).hexdigest()
     return key