Give dumbdbm a sync() method which Shelve can call. Should solve some

database corruption problems with Spambayes.
This commit is contained in:
Skip Montanaro 2003-07-14 12:15:15 +00:00
parent a2d3d93ee3
commit 6d06815b56

View file

@ -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')