Comment 3 for bug 216755

Revision history for this message
Michael Otteneder (m-otteneder) wrote :

Looks like you have to import anydbm in order to use anydbm.error. But I don't think that it can be thrown by shelve.open()

Tinuviel:p1tr mc$ python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import shelve
>>> anydbm
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'anydbm' is not defined
>>> import anydbm
>>> anydbm.error
(<class 'anydbm.error'>, <class 'dbm.error'>, <type 'exceptions.IOError'>)