Author: phd
Date: 2010-03-03 09:50:47 -0700 (Wed, 03 Mar 2010)
New Revision: 4115
Modified:
SQLObject/trunk/sqlobject/main.py
Log:
Merged revision 4113 from branch 0.11: compare identities.
Modified: SQLObject/trunk/sqlobject/main.py
===================================================================
--- SQLObject/trunk/sqlobject/main.py 2010-03-03 16:50:22 UTC (rev 4114)
+++ SQLObject/trunk/sqlobject/main.py 2010-03-03 16:50:47 UTC (rev 4115)
@@ -921,7 +921,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.
@@ -1208,7 +1208,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
|