Message282166
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
''' |
|
Date |
User |
Action |
Args |
2016-12-01 12:23:05 | Jonathan Ng | set | recipients:
+ Jonathan Ng, serhiy.storchaka |
2016-12-01 12:23:05 | Jonathan Ng | set | messageid: <1480594985.41.0.695269027337.issue28847@psf.upfronthosting.co.za> |
2016-12-01 12:23:05 | Jonathan Ng | link | issue28847 messages |
2016-12-01 12:23:05 | Jonathan Ng | create | |
|