Jonathan Ng added the comment:
#1 makes sense to be backported.
On Thu, Dec 1, 2016 at 8:41 PM, Serhiy Storchaka
wrote:
>
> Serhiy Storchaka added the comment:
>
> This example is too artificial.
>
> But there is a real issue: opening read-only files in read mode. Current
Jonathan Ng added the comment:
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('tem
New submission from Jonathan Ng:
Or at the very least, if there is an OSError in _update, an error should be
raised instead of ignoring this error.
In the current state of the code, if there was an OSError while reading the
dirfile, the dirfile would be overwritten with a blank file when it
Changes by Jonathan Ng :
--
nosy: Jonathan Ng
priority: normal
severity: normal
status: open
title: dumbdbm should not commit if
type: behavior
___
Python tracker
<http://bugs.python.org/issue28