changeset 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 ed3baf538cd5
children 76a76def8687 a36c70e5f0dd c3fcddbf0c51
files MoinMoin/caching.py docs/CHANGES.aschremmer
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
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
--- a/docs/CHANGES.aschremmer	Thu Aug 17 19:53:28 2006 +0200
+++ b/docs/CHANGES.aschremmer	Thu Aug 17 19:58:52 2006 +0200
@@ -57,6 +57,7 @@
     * Fixed bug in request.py that avoided showing a traceback if there was a fault
       after the first headers were sent.
     * Fixed severe race conditions in the meta dict and the sync tags code.
+    * Mute the tempnam warning in the caching module.
 
   Other Changes:
     * Refactored conflict resolution and XMLRPC code.