Commit 14e73eb3 authored by Jan-Jaap Driessen's avatar Jan-Jaap Driessen

Leave the direct definition of IBlobStorage in place, only expand the...

Leave the direct definition of IBlobStorage in place, only expand the definition if necessary inside the __init__.
parent 6dfe5254
...@@ -733,6 +733,7 @@ class BlobStorageMixin(object): ...@@ -733,6 +733,7 @@ class BlobStorageMixin(object):
return self.fshelper.temp_dir return self.fshelper.temp_dir
@zope.interface.implementer(ZODB.interfaces.IBlobStorage)
class BlobStorage(BlobStorageMixin): class BlobStorage(BlobStorageMixin):
"""A wrapper/proxy storage to support blobs. """A wrapper/proxy storage to support blobs.
""" """
...@@ -753,12 +754,10 @@ class BlobStorage(BlobStorageMixin): ...@@ -753,12 +754,10 @@ class BlobStorage(BlobStorageMixin):
self._blobs_pack_is_in_progress = False self._blobs_pack_is_in_progress = False
if ZODB.interfaces.IStorageRestoreable.providedBy(storage): if ZODB.interfaces.IStorageRestoreable.providedBy(storage):
iblob = ZODB.interfaces.IBlobStorageRestoreable
else:
iblob = ZODB.interfaces.IBlobStorage
zope.interface.directlyProvides( zope.interface.directlyProvides(
self, iblob, zope.interface.providedBy(storage)) self,
ZODB.interfaces.IBlobStorageRestoreable,
zope.interface.providedBy(storage))
def __getattr__(self, name): def __getattr__(self, name):
return getattr(self.__storage, name) return getattr(self.__storage, name)
......
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