Author: ianb
Date: 2005-05-05 22:58:15 +0000 (Thu, 05 May 2005)
New Revision: 769
Modified:
trunk/SQLObject/sqlobject/dbconnection.py
Log:
Fixes problem with per-instance connections and ConnectionHub
Modified: trunk/SQLObject/sqlobject/dbconnection.py
===================================================================
--- trunk/SQLObject/sqlobject/dbconnection.py 2005-05-05 21:46:28 UTC (rev 768)
+++ trunk/SQLObject/sqlobject/dbconnection.py 2005-05-05 22:58:15 UTC (rev 769)
@@ -809,6 +809,11 @@
self.threadingLocal = threading_local()
def __get__(self, obj, type=None):
+ # I'm a little surprised we have to do this, but apparently
+ # the object's private dictionary of attributes doesn't
+ # override this descriptor.
+ if obj.__dict__.has_key('_connection'):
+ return obj.__dict__['_connection']
return self.getConnection()
def __set__(self, obj, value):
|