This is Python 2.4.4 on Debian Etch.
Look at the following interpreter session:
Python 2.4.4c0 (#2, Jun 14 2006, 22:35:41)
[GCC 4.1.2 20060613 (prerelease) (Debian 4.1.1-4)]
on linux2
Type "help", "copyright", "credits" or "license"
for more information.
>>> import shelve
>>> import anydbm
>>> try:
... shelve.open('nonexistent', 'r')
... except anydbm.error:
... print 'caught it'
...
caught it
Exception exceptions.AttributeError:
"DbfilenameShelf instance has no
attribute 'writeback'" in ignored
>>> anydbm.error
(<class anydbm.error at 0xb7f48bfc>,
<class bsddb._db.DBError at 0xb7f5623c>,
<class gdbm.error at 0xb7f48cbc>,
<class dbm.error at 0xb7f5b38c>,
<class exceptions.IOError at 0xb7f774ac>)
>>>
Shelf.__del__() calls Shelf.close() calls Shelf.sync()
which
references self.writeback even though that attribute
doesn't exist.
It also references self.dict which also doesn't exist.
|