Commit 5afe69f8 authored by Jeremy Hylton's avatar Jeremy Hylton

Look for fsync() in os module.

Windows will have fsync() starting with 2.2.3.
parent ea812db6
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
# may have a back pointer to a version record or to a non-version # may have a back pointer to a version record or to a non-version
# record. # record.
# #
__version__='$Revision: 1.129 $'[11:-2] __version__='$Revision: 1.130 $'[11:-2]
import base64 import base64
from cPickle import Pickler, Unpickler, loads from cPickle import Pickler, Unpickler, loads
...@@ -127,10 +127,8 @@ import time ...@@ -127,10 +127,8 @@ import time
from types import StringType, DictType from types import StringType, DictType
from struct import pack, unpack from struct import pack, unpack
try: # Not all platforms have fsync
from posix import fsync fsync = getattr(os, "fsync", None)
except:
fsync = None
from ZODB import BaseStorage, ConflictResolution, POSException from ZODB import BaseStorage, ConflictResolution, POSException
from ZODB.POSException import UndoError, POSKeyError, MultipleUndoErrors from ZODB.POSException import UndoError, POSKeyError, MultipleUndoErrors
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment