[Python-checkins] CVS: python/dist/src/Lib dumbdbm.py,1.10,1.10.4.1
Anthony Baxter
anthonybaxter@users.sourceforge.net
Thu, 20 Dec 2001 20:46:21 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv4673
Modified Files:
Tag: release21-maint
dumbdbm.py
Log Message:
d'oh! could have _sworn_ I checked this in last weekend.
Make dumbdbm merely "dumb", rather than "terminally broken". Without this
patch, it's almost impossible to use dumbdbm _without_ causing horrible
datalossage. With this patch, dumbdbm passes my own horrible torture test,
as well as the roundup test suite.
dumbdbm really could do with a smidgin of a rewrite or two, but that's not
suitable for the release21-maint branch.
This patch should go into the trunk as well.
Index: dumbdbm.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/dumbdbm.py,v
retrieving revision 1.10
retrieving revision 1.10.4.1
diff -C2 -d -r1.10 -r1.10.4.1
*** dumbdbm.py 2001/03/02 06:43:49 1.10
--- dumbdbm.py 2001/12/21 04:46:19 1.10.4.1
***************
*** 140,145 ****
--- 140,150 ----
def close(self):
+ self._commit()
self._index = None
self._datfile = self._dirfile = self._bakfile = None
+
+ def __del__(self):
+ if self._index is not None:
+ self._commit()