[Zodb-checkins] CVS: Zope3/src/zodb/storage/file - main.py:1.2.2.1
Jeremy Hylton
jeremy at zope.com
Wed Apr 30 16:09:51 EDT 2003
Update of /cvs-repository/Zope3/src/zodb/storage/file
In directory cvs.zope.org:/tmp/cvs-serv20376
Modified Files:
Tag: jeremy-query-branch
main.py
Log Message:
Look for fsync() in os module.
Windows will have fsync() starting with 2.2.3.
=== Zope3/src/zodb/storage/file/main.py 1.2 => 1.2.2.1 ===
--- Zope3/src/zodb/storage/file/main.py:1.2 Tue Apr 22 11:23:12 2003
+++ Zope3/src/zodb/storage/file/main.py Wed Apr 30 15:09:49 2003
@@ -28,10 +28,8 @@
from struct import pack, unpack
from cPickle import Pickler, Unpickler, loads
-try:
- from posix import fsync
-except:
- fsync = None
+# Not all platforms have fsync
+fsync = getattr(os, "fsync", None)
import zodb.db
from zodb.storage.base import BaseStorage, splitrefs
More information about the Zodb-checkins
mailing list