[SQL-CVS] r561 - trunk/SQLObject/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2005-02-01 05:59:34
|
Author: ianb Date: 2005-02-01 05:59:29 +0000 (Tue, 01 Feb 2005) New Revision: 561 Modified: trunk/SQLObject/sqlobject/dbconnection.py Log: Be careful when __del__ happens not to throw an exception Modified: trunk/SQLObject/sqlobject/dbconnection.py =================================================================== --- trunk/SQLObject/sqlobject/dbconnection.py 2005-01-31 22:57:35 UTC (rev 560) +++ trunk/SQLObject/sqlobject/dbconnection.py 2005-02-01 05:59:29 UTC (rev 561) @@ -480,6 +480,10 @@ self.close() def close(self): + if not hasattr(self, '_pool'): + # Probably there was an exception while creating this + # instance, so it is incomplete. + return if not self._pool: return self._poolLock.acquire() |