[ZODB-Dev] FileStorage on readonly media

Ury Marshak urym at two-bytes.com
Thu Mar 11 11:58:28 EST 2004


Using current ZODB3 CVS I tried putting a database file on
a CD-ROM. Of course I'm creating the storage with a
read_only=True parameter. Unfortunately it dies in the
FileStorage._save_index() . My question is first if my line of
thinking is logical - that if I open a database as read-only, then
it should be able to operate from a read-only media?
If so, what would be the best way to fix it - to put a check in
_save_index() , something like

        if self._is_read_only:
            return

or is this going to break something? Also are there in ZODB
any other writes to disk that shouldn't be necessary when
running read-only?

Ury





More information about the ZODB-Dev mailing list