[Zodb-checkins] CVS: ZODB3/ZODB - FileStorage.py:1.130

Jeremy Hylton jeremy at zope.com
Wed Apr 30 16:04:18 EDT 2003


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv19685

Modified Files:
	FileStorage.py 
Log Message:
Look for fsync() in os module.

Windows will have fsync() starting with 2.2.3.


=== ZODB3/ZODB/FileStorage.py 1.129 => 1.130 ===
--- ZODB3/ZODB/FileStorage.py:1.129	Mon Mar 17 13:58:30 2003
+++ ZODB3/ZODB/FileStorage.py	Wed Apr 30 15:04:17 2003
@@ -127,10 +127,8 @@
 from types import StringType, DictType
 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, MultipleUndoErrors




More information about the Zodb-checkins mailing list