[Zope-Checkins] CVS: Packages - FileStorage.py:1.60.4.2
andreasjung@cvs.baymountain.com
andreasjung@cvs.baymountain.com
Thu, 19 Jul 2001 07:56:54 -0400
Update of /cvs-repository/Packages/ZODB
In directory cvs.baymountain.com:/tmp/cvs-serv14902/lib/python/ZODB
Modified Files:
Tag: Zope-2_4-branch
FileStorage.py
Log Message:
Collector #2412: a read-only FileStorage has not been closed
properly.
====== Updated Packages/FileStorage.py to v 1.60.4.2 ======
if stop==z64: raise FileStorageError, 'Invalid pack time'
+ # Record pack time so we don't undo while packing
+ _lock_acquire()
try:
- ##################################################################
- # Step 1, get index as of pack time that
- # includes only referenced objects.
-
- # Record pack time so we don't undo while packing
- _lock_acquire()
- locked=1
if self._packt != z64:
+ # Already packing.
raise FileStorageError, 'Already packing'
self._packt=stop
+ finally:
_lock_release()
- locked=0
-
+
+ try:
+ ##################################################################
+ # Step 1, get index as of pack time that
+ # includes only referenced objects.
+
packpos, maxoid, ltid = read_index(
file, name, index, vindex, tindex, stop,
read_only=1,