diff MoinMoin/caching.py @ 1316:c4f6af5ee295

Mute the tempnam warning in the caching module.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Thu, 17 Aug 2006 19:58:52 +0200
parents 238c43cb8877
children 76a76def8687
line wrap: on
line diff
--- a/MoinMoin/caching.py	Thu Aug 17 19:53:28 2006 +0200
+++ b/MoinMoin/caching.py	Thu Aug 17 19:58:52 2006 +0200
@@ -7,9 +7,15 @@
 """
 
 import os
+import warnings
+
 from MoinMoin import config
 from MoinMoin.util import filesys, lock
 
+# filter the tempname warning because we create the tempfile only in directories
+# where only we should have write access initially
+warnings.filterwarnings("ignore", "tempnam.*security", RuntimeWarning, "MoinMoin.caching")
+
 class CacheEntry:
     def __init__(self, request, arena, key, scope='page_or_wiki', do_locking=True):
         """ init a cache entry