diff MoinMoin/action/cache.py @ 3873:e5a9570d3001

secrets configuration refactored - see the snippet for an example usage
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 19 Jul 2008 13:29:16 +0200
parents 9eb4ffbe654d
children 87b63ed39102
line wrap: on
line diff
--- a/MoinMoin/action/cache.py	Sat Jul 19 10:26:47 2008 +0200
+++ b/MoinMoin/action/cache.py	Sat Jul 19 13:29:16 2008 +0200
@@ -89,8 +89,10 @@
     @param attachname: the filename of the attachment
     @param content: content data as unicode object (e.g. for page content or
                     parser section content)
+    @param secret: secret for hMAC calculation (default: use secret from cfg)
     """
-    secret = secret or 'nobodyexpectedsuchasecret'
+    if secret is None:
+        secret = request.cfg.secrets['action/cache']
     if content:
         hmac_data = content
     elif itemname is not None and attachname is not None: