Skip to content

Commit

Permalink
Fixed BlobStorage-support for Plone >= 4.1 (regression since 0.3.3).
Browse files Browse the repository at this point in the history
  • Loading branch information
datakurre committed Apr 24, 2012
1 parent 952fe18 commit 3f8706e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sauna/reload/adapters.py
Expand Up @@ -53,7 +53,11 @@ class ZODBFileStorageDatabaseHooksAdapter(object):
adapts(FileStorage)

def __init__(self, context):
self.context = context
# Try to get the *real* FileStorage,
# because `context` may be just a BlobStorage-wrapper
# and it wraps FileStorage differently between
# ZODB3-3.9.5 and 3.10.x-series (eg. between Plone 4.0 and 4.1).
self.context = getattr(context, '_BlobStorage__storage', context)

def prepareForReload(self):
# Save ``Data.fs.index`` before dying
Expand Down

0 comments on commit 3f8706e

Please sign in to comment.