When I try to close a database connection, I get the
message:
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:
E:\PyDevSrc\Dp6_dev>svn diff
Index: 3rdPartyCode/kinterbasdb/__init__.py
===================================================================
--- 3rdPartyCode/kinterbasdb/__init__.py
(revision 43)
+++ 3rdPartyCode/kinterbasdb/__init__.py
(working copy)
@@ -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):
_k.close_connection(self._C_con)
self._C_con = _k.null_connection
elif raiseExceptionOnError:
Regards,
David Hughes
David S. Rushby
General problems
None
Public
|
Date: 2004-10-25 06:34 Logged In: YES |
|
Date: 2004-10-03 17:58 Logged In: YES |
|
Date: 2004-08-31 09:13 Logged In: YES |
|
Date: 2004-08-27 02:09 Logged In: YES |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2004-10-25 06:34 | woodsplitter |
| category_id | None | 2004-10-25 06:34 | woodsplitter |
| close_date | - | 2004-10-25 06:34 | woodsplitter |
| resolution_id | None | 2004-10-03 17:58 | woodsplitter |
| assigned_to | nobody | 2004-08-27 02:09 | woodsplitter |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use