This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jonathan Ng
Recipients Jonathan Ng, serhiy.storchaka
Date 2016-12-01.12:23:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480594985.41.0.695269027337.issue28847@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not sure how to create an OSError.

But perhaps something like this:

'''
from dbm import dumb
import os

db = dumb.open('temp', flag='n')
db['foo'] = 'bar'
db.close()

db = dumb.open('temp', flag='r')
print(len(db.keys()))
db.close

os.rename('temp.dir', 'temp_.dir') # simulates OSError
db = dumb.open('temp', flag='r')
os.rename('temp_.dir', 'temp.dir')
db.close()

db = dumb.open('temp', flag='r')
assert len(db.keys()) > 0
'''
History
Date User Action Args
2016-12-01 12:23:05Jonathan Ngsetrecipients: + Jonathan Ng, serhiy.storchaka
2016-12-01 12:23:05Jonathan Ngsetmessageid: <1480594985.41.0.695269027337.issue28847@psf.upfronthosting.co.za>
2016-12-01 12:23:05Jonathan Nglinkissue28847 messages
2016-12-01 12:23:05Jonathan Ngcreate