From: Jehiah C. <je...@gm...> - 2008-03-13 15:52:09
Attachments:
dbutils_nonetype.patch
|
The following bug has been noted before, and I'm including a patch for it that hopefully someone on this list can apply to trunk for me The Error is as follows, and happens when a script or program is shutting down when the PooledDB object is getting cleaned up: Exception exceptions.TypeError: "'NoneType' object is not callable" in <bound method PooledDB.__del__ of <DBUtils.PooledDB.PooledDB instance at 0xb6a7166c>> ignored (previous observances) http://www.mail-archive.com/web...@li.../msg02612.html http://groups.google.co.ve/group/webpy/msg/ed1febae877f6bae The problem code is in PooledDB: def __del__(self): """Delete the pool.""" if hasattr(self, '_connections'): self.close() However in my case _connections = 0, so we need to change it to do this: def __del__(self): """Delete the pool.""" if hasattr(self, '_connections') and self._connections>0: self.close() This was observed when using cx_Oracle as the database class but i don't know that it caused this at all because one of the referenced observances was against mysql a patch file against trunk is attached. (Credit for fixing this goes to Susan Anderson our DBA at work who tracked down the fix) -- Jehiah |
From: Christoph Z. <ci...@on...> - 2008-03-13 16:04:45
|
Jehiah Czebotar schrieb: > The following bug has been noted before, and I'm including a patch for > it that hopefully someone on this list can apply to trunk for me Thanks a lot for the bug report. I'll get that fixed that in the next DBUtils release. -- Christoph |