Kaydet (Commit) 6d06815b authored tarafından Skip Montanaro's avatar Skip Montanaro

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

database corruption problems with Spambayes.
üst a2d3d93e
......@@ -110,6 +110,8 @@ class _Database(UserDict.DictMixin):
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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment