]> granicus.if.org Git - python/commitdiff
Give dumbdbm a sync() method which Shelve can call. Should solve some
authorSkip Montanaro <skip@pobox.com>
Mon, 14 Jul 2003 12:15:15 +0000 (12:15 +0000)
committerSkip Montanaro <skip@pobox.com>
Mon, 14 Jul 2003 12:15:15 +0000 (12:15 +0000)
database corruption problems with Spambayes.

Lib/dumbdbm.py

index 7b4ddb02fb035bb723b0abe44db090bfd037ca57..b85844dc611a8c86245b402f4d1a42c902082ed0 100644 (file)
@@ -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')