[SQL-CVS] r4113 - SQLObject/branches/0.11/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2010-03-03 17:08:14
|
Author: phd Date: 2010-03-03 09:48:54 -0700 (Wed, 03 Mar 2010) New Revision: 4113 Modified: SQLObject/branches/0.11/sqlobject/main.py Log: Compare identities - connections don't support comparison. Modified: SQLObject/branches/0.11/sqlobject/main.py =================================================================== --- SQLObject/branches/0.11/sqlobject/main.py 2010-03-01 05:59:22 UTC (rev 4112) +++ SQLObject/branches/0.11/sqlobject/main.py 2010-03-03 16:48:54 UTC (rev 4113) @@ -922,7 +922,7 @@ # If no connection was given, we'll inherit the class # instance variable which should have a _connection # attribute. - if (connection is not None) and (self._connection != connection): + if (connection is not None) and (self._connection is not connection): self._connection = connection # Sometimes we need to know if this instance is # global or tied to a particular connection. @@ -1209,7 +1209,7 @@ # Pass the connection object along if we were given one. if kw.has_key('connection'): connection = kw.pop('connection') - if self._connection != connection: + if self._connection is not connection: self._connection = connection self.sqlmeta._perConnection = True |