[SQL-CVS] r172 - trunk/SQLObject/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2004-08-18 00:35:57
|
Author: ianb Date: 2004-08-17 16:27:04 -0400 (Tue, 17 Aug 2004) New Revision: 172 Modified: trunk/SQLObject/sqlobject/dbconnection.py Log: Deal with (questionable?) case where the destructor is called with a missing instance variable Modified: trunk/SQLObject/sqlobject/dbconnection.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/SQLObject/sqlobject/dbconnection.py 2004-08-17 20:24:18 UTC (re= v 171) +++ trunk/SQLObject/sqlobject/dbconnection.py 2004-08-17 20:27:04 UTC (re= v 172) @@ -448,7 +448,7 @@ return obj =20 def _cleanup(self): - if self.query is None: + if getattr(self, 'query', None) is None: # already cleaned up return self.query =3D None |