Commit fe9c46c9 authored by Kirill Smelkov's avatar Kirill Smelkov

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 c5e18c74
...@@ -395,4 +395,11 @@ def zstor_2zurl(zstor): ...@@ -395,4 +395,11 @@ def zstor_2zurl(zstor):
return u 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) 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