Commit 206969bb authored by Kirill Smelkov's avatar Kirill Smelkov

X lib/zodb: zstor_2zurl: Explicitly reject MappingStorage

It is not possible for WCFS to access data of in-RAM storage of another
process. But without explicit explanation the error message is confusing
- it was something like:

    NotImplementedError: don't know how to extract zurl from <ZODB.MappingStorage.MappingStorage object at 0x7f28f04cea10>

which suggests it was just not implemented.
parent 3c2a1e25
......@@ -371,4 +371,11 @@ def zstor_2zurl(zstor):
return u
# MappingStorage:
if ztype == "ZODB.MappingStorage.MappingStorage":
raise ValueError("%s is in-RAM storage\n" +
"\tin-RAM storages are not supported:\n" +
"\ta zurl pointing to in-RAM storage in one process would lead to\n"
"\tanother in-RAM storage in WCFS process." % ztype)
raise NotImplementedError("don't know how to extract zurl from %r" % zstor)
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