When I try to close a database connection, I get the
Exception exceptions.AttributeError: "'NoneType' object
has no attribute 'is_purportedly_open'" in <bound
method Connection.__del__ of <kinterbasdb.Connection
instance at 0x01B73D28>> ignored
This seems to be occuring during a *second* call to
_close_physical_connection() when it is called by the
connection's __del__ method, by which time _k is None.
The following patch seems to prevent it:
@@ -880,7 +880,7 @@
# of that type, so that post-close() method
calls on this connection
# will raise ProgrammingErrors, as required by
the DB API Spec.
if hasattr(self, '_C_con'):
- if _k.is_purportedly_open(self._C_con):
+ if _k and _k.is_purportedly_open(self._C_con):
self._C_con = _k.null_connection
Log in to post a comment.