[Zodb-checkins] CVS: Zope/lib/python/ZODB - FileStorage.py:1.98.2.8

Jeremy Hylton jeremy at zope.com
Wed Apr 30 16:10:03 EDT 2003


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

Modified Files:
      Tag: Zope-2_6-branch
	FileStorage.py 
Log Message:
Look for fsync() in os module.

Windows will have fsync() starting with 2.2.3.


=== Zope/lib/python/ZODB/FileStorage.py 1.98.2.7 => 1.98.2.8 ===
--- Zope/lib/python/ZODB/FileStorage.py:1.98.2.7	Mon Mar 17 14:00:20 2003
+++ Zope/lib/python/ZODB/FileStorage.py	Wed Apr 30 15:10:02 2003
@@ -127,10 +127,8 @@
 from types import StringType
 from struct import pack, unpack
 
-try:
-    from posix import fsync
-except:
-    fsync = None
+# Not all platforms have fsync
+fsync = getattr(os, "fsync", None)
 
 from ZODB import BaseStorage, ConflictResolution, POSException
 from ZODB.POSException import UndoError, POSKeyError




More information about the Zodb-checkins mailing list