Re: Not very helpful error when no DSToolkits are reachable

Toby Dickenson <[email protected]>
Newsgroups gmane.comp.web.zope.zodb.dirstorage
Message-ID <[email protected]>
On Thursday 25 Aug 2005 18:12, Paul Winkler wrote:
> it would be really
> nice if snapshot-using scripts gave a more informative message than this:

There is an exception handler there which tries to convert this exception 
into:

raise DirectoryStorageError('Could not lock storage directory')

At some point ZODB changed the exception type used to indicate locking 
failure. You see this unhelpful message if using older version of 
DirectoryStorage with newer versions of ZODB. Recent DirectoryStorages show 
the intended error message with all ZODB versions.

> The comment in acquire() says:
.....
> I would add one more case:
>
>         # 5. closer is None even though the storage is running,
>         #    because there was some problem connecting to all
>         #    of the DirectoryStorageToolkit(s) specified in
>         #    config/snapshot.conf, so we were unable to put the storage
>         #    into snapshot mode.
>         #    Locking will fail.

Yes. now added. thanks. Ive also changed that exception message to:

raise DirectoryStorageError('Could not lock storage directory. Check 
snapshot.py for fault-finding suggestions')



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.