Commit ec6f44d2 authored by Jeremy Hylton's avatar Jeremy Hylton

If a commitlog is open when the storage is closed, close it. This allows

the Windows test suite to pass.
parent 31912b3c
...@@ -4,7 +4,7 @@ See Minimal.py for an implementation of Berkeley storage that does not support ...@@ -4,7 +4,7 @@ See Minimal.py for an implementation of Berkeley storage that does not support
undo or versioning. undo or versioning.
""" """
__version__ = '$Revision: 1.29 $'[-2:][0] __version__ = '$Revision: 1.30 $'[-2:][0]
import sys import sys
import struct import struct
...@@ -165,6 +165,8 @@ class Full(BerkeleyBase, ConflictResolvingStorage): ...@@ -165,6 +165,8 @@ class Full(BerkeleyBase, ConflictResolvingStorage):
#self._nextserial = 0L #self._nextserial = 0L
def close(self): def close(self):
if self._commitlog is not None:
self._commitlog.close()
self._serials.close() self._serials.close()
self._pickles.close() self._pickles.close()
self._vids.close() self._vids.close()
......
...@@ -4,7 +4,7 @@ See Full.py for an implementation of Berkeley storage that does support undo ...@@ -4,7 +4,7 @@ See Full.py for an implementation of Berkeley storage that does support undo
and versioning. and versioning.
""" """
__version__ = '$Revision: 1.9 $'[-2:][0] __version__ = '$Revision: 1.10 $'[-2:][0]
# This uses the Dunn/Kuchling PyBSDDB v3 extension module available from # This uses the Dunn/Kuchling PyBSDDB v3 extension module available from
# http://pybsddb.sourceforge.net. It is compatible with release 3.0 of # http://pybsddb.sourceforge.net. It is compatible with release 3.0 of
...@@ -122,6 +122,8 @@ class Minimal(BerkeleyBase): ...@@ -122,6 +122,8 @@ class Minimal(BerkeleyBase):
# that just to reclaim the garbage? # that just to reclaim the garbage?
self._serials.close() self._serials.close()
self._pickles.close() self._pickles.close()
if self._commitlog is not None:
self._commitlog.close()
# Base class implements some useful close behavior # Base class implements some useful close behavior
BerkeleyBase.close(self) BerkeleyBase.close(self)
......
...@@ -4,7 +4,7 @@ See Minimal.py for an implementation of Berkeley storage that does not support ...@@ -4,7 +4,7 @@ See Minimal.py for an implementation of Berkeley storage that does not support
undo or versioning. undo or versioning.
""" """
__version__ = '$Revision: 1.29 $'[-2:][0] __version__ = '$Revision: 1.30 $'[-2:][0]
import sys import sys
import struct import struct
...@@ -165,6 +165,8 @@ class Full(BerkeleyBase, ConflictResolvingStorage): ...@@ -165,6 +165,8 @@ class Full(BerkeleyBase, ConflictResolvingStorage):
#self._nextserial = 0L #self._nextserial = 0L
def close(self): def close(self):
if self._commitlog is not None:
self._commitlog.close()
self._serials.close() self._serials.close()
self._pickles.close() self._pickles.close()
self._vids.close() self._vids.close()
......
...@@ -4,7 +4,7 @@ See Full.py for an implementation of Berkeley storage that does support undo ...@@ -4,7 +4,7 @@ See Full.py for an implementation of Berkeley storage that does support undo
and versioning. and versioning.
""" """
__version__ = '$Revision: 1.9 $'[-2:][0] __version__ = '$Revision: 1.10 $'[-2:][0]
# This uses the Dunn/Kuchling PyBSDDB v3 extension module available from # This uses the Dunn/Kuchling PyBSDDB v3 extension module available from
# http://pybsddb.sourceforge.net. It is compatible with release 3.0 of # http://pybsddb.sourceforge.net. It is compatible with release 3.0 of
...@@ -122,6 +122,8 @@ class Minimal(BerkeleyBase): ...@@ -122,6 +122,8 @@ class Minimal(BerkeleyBase):
# that just to reclaim the garbage? # that just to reclaim the garbage?
self._serials.close() self._serials.close()
self._pickles.close() self._pickles.close()
if self._commitlog is not None:
self._commitlog.close()
# Base class implements some useful close behavior # Base class implements some useful close behavior
BerkeleyBase.close(self) BerkeleyBase.close(self)
......
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