mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
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
1 changed files with 2 additions and 0 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue