[Zope3-checkins] CVS: Zope3/src/zodb/storage - demo.py:1.9

Guido van Rossum guido@python.org
Thu, 24 Apr 2003 15:17:17 -0400


Update of /cvs-repository/Zope3/src/zodb/storage
In directory cvs.zope.org:/tmp/cvs-serv16272

Modified Files:
	demo.py 
Log Message:
In close(), call the base class close()!!!

Not doing this caused a really weird bug: when running the full Zope3
test suite with the latest CVS Python 2.3 (it didn't happen with a 2.3
built on April 21), we saw the following sequence repeated many times
*after* reporting all tests OK:

  Unhandled exception in thread:
  Error in sys.excepthook:

  Original exception was:

Further debugging showed that this was caused by still-running daemon
threads running the _Checkpoint() class from zodb/storage/base.py.
But this class itself appeared harmless; the real culprit was the
demo close() method.  Thanks to Barry for the fix.


=== Zope3/src/zodb/storage/demo.py 1.8 => 1.9 ===
--- Zope3/src/zodb/storage/demo.py:1.8	Fri Apr 11 05:00:46 2003
+++ Zope3/src/zodb/storage/demo.py	Thu Apr 24 15:17:16 2003
@@ -52,6 +52,7 @@
         self._oid = self._back.lastObjectId()
 
     def close(self):
+        super(DemoStorage, self).close()
         self._back.close()
 
     def cleanup(self):