mirror of https://github.com/python/cpython.git
Give dumbdbm a sync() method which Shelve can call. Should solve some
database corruption problems with Spambayes.
This commit is contained in:
parent
a2d3d93ee3
commit
6d06815b56
|
@ -110,6 +110,8 @@ def _commit(self):
|
|||
f.write("%r, %r\n" % (key, pos_and_siz_pair))
|
||||
f.close()
|
||||
|
||||
sync = _commit
|
||||
|
||||
def __getitem__(self, key):
|
||||
pos, siz = self._index[key] # may raise KeyError
|
||||
f = _open(self._datfile, 'rb')
|
||||
|
|
Loading…
Reference in New Issue