[Zodb-checkins] CVS: Zope/lib/python/ZEO - ClientCache.py:1.47.4.2

Jeremy Hylton jeremy at zope.com
Thu Feb 26 15:36:49 EST 2004


Update of /cvs-repository/Zope/lib/python/ZEO
In directory cvs.zope.org:/tmp/cvs-serv23443

Modified Files:
      Tag: Zope-2_7-branch
	ClientCache.py 
Log Message:
Provide useful log identifiers for TemporaryFile caches.

The old code had a comment that said self._p = [None, None] was a
special-case meaning tempfile caches.  The only place where self._p is
used is for the log, so I don't think that comment was saying anything
important.


=== Zope/lib/python/ZEO/ClientCache.py 1.47.4.1 => 1.47.4.2 ===
--- Zope/lib/python/ZEO/ClientCache.py:1.47.4.1	Mon Sep 15 14:02:59 2003
+++ Zope/lib/python/ZEO/ClientCache.py	Thu Feb 26 15:36:48 2004
@@ -183,8 +183,10 @@
                 f[1] = None
         else:
             self._f = f = [tempfile.TemporaryFile(suffix='.zec'), None]
-            # self._p file name 'None' signifies an unnamed temp file.
-            self._p = p = [None, None]
+            # If they are temp files just use illustrative names so
+            # that the log messages describe the cache.
+            self._p = p = ["%s-%s-0" % (storage, client),
+                           "%s-%s-1" % (storage, client)]
             f[0].write(magic + '\0' * (headersize - len(magic)))
             current = 0
         self._current = current




More information about the Zodb-checkins mailing list