From 6d06815b562e1540ee334d30953354210dfebd24 Mon Sep 17 00:00:00 2001
From: Skip Montanaro <skip@pobox.com>
Date: Mon, 14 Jul 2003 12:15:15 +0000
Subject: Give dumbdbm a sync() method which Shelve can call.  Should solve
 some database corruption problems with Spambayes.

---
 Lib/dumbdbm.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Lib/dumbdbm.py b/Lib/dumbdbm.py
index 7b4ddb0..b85844d 100644
--- a/Lib/dumbdbm.py
+++ b/Lib/dumbdbm.py
@@ -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')
-- 
cgit v0.12

