[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/Blobs/BlobStorage.py
Support storages without any undo methods.
Jim Fulton
jim at zope.com
Thu Apr 26 19:20:28 EDT 2007
Log message for revision 74843:
Support storages without any undo methods.
Changed:
U ZODB/trunk/src/ZODB/Blobs/BlobStorage.py
-=-
Modified: ZODB/trunk/src/ZODB/Blobs/BlobStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/Blobs/BlobStorage.py 2007-04-26 23:20:25 UTC (rev 74842)
+++ ZODB/trunk/src/ZODB/Blobs/BlobStorage.py 2007-04-26 23:20:28 UTC (rev 74843)
@@ -41,7 +41,7 @@
# Proxies can't have a __dict__ so specifying __slots__ here allows
# us to have instance attributes explicitly on the proxy.
- __slots__ = ('fshelper', 'dirty_oids')
+ __slots__ = ('fshelper', 'dirty_oids', '_BlobStorage__supportsUndo')
def __new__(self, base_directory, storage):
return SpecificationDecoratorBase.__new__(self, storage)
@@ -53,6 +53,13 @@
self.fshelper.create()
self.fshelper.checkSecure()
self.dirty_oids = []
+ try:
+ supportsUndo = storage.supportsUndo
+ except AttributeError:
+ supportsUndo = False
+ else:
+ supportsUndo = supportsUndo()
+ self.__supportsUndo = supportsUndo
@non_overridable
def __repr__(self):
@@ -184,7 +191,7 @@
# perform a pack on blob data
self._lock_acquire()
try:
- if unproxied.supportsUndo():
+ if self.__supportsUndo:
self._packUndoing(packtime, referencesf)
else:
self._packNonUndoing(packtime, referencesf)
More information about the Zodb-checkins
mailing list