[Zodb-checkins] CVS: ZEO/ZEO - ClientCache.py:1.18.6.3.2.2 TransactionBuffer.py:1.3.2.2.2.2

Tim Peters tim.one@comcast.net
Tue, 21 May 2002 18:28:57 -0400


Update of /cvs-repository/ZEO/ZEO
In directory cvs.zope.org:/tmp/cvs-serv9097/ZEO

Modified Files:
      Tag: ZEO2-branch
	ClientCache.py TransactionBuffer.py 
Log Message:
Some Windows-specific changes.


=== ZEO/ZEO/ClientCache.py 1.18.6.3.2.1 => 1.18.6.3.2.2 ===
         for f in self._f:
             if f is not None:
-                f.close()
+                # In 2.1 on Windows, the TemporaryFileWrapper doesn't allow
+                # closing a file more than once.
+                try:
+                    f.close()
+                except OSError:
+                    pass
 
     def verify(self, verifyFunc):
         """Call the verifyFunc on every object in the cache.


=== ZEO/ZEO/TransactionBuffer.py 1.3.2.2.2.1 => 1.3.2.2.2.2 ===
         self.pickler.fast = 1
 
-    def close(self):
-        self.file.close()
+    def close(self): 
+        try:
+            self.file.close()
+        except OSError:
+            pass
+        
 
     def store(self, oid, version, data):
         """Store oid, version, data for later retrieval"""