dabo Commit
Revision 7283
Date: 2012-10-16 19:14:27 -0700 (Tue, 16 Oct 2012)
Author: Nate
Trac: http://trac.dabodev.com/changeset/7283

Changed:
U   trunk/dabo/biz/dBizobj.py
U   trunk/dabo/db/dbMySQL.py

Log:
Fixed the error Paul and Jacek were getting with the latest cursor commit.  
Stupid mistake on my part.  I wasn't return the result of execute, so the biz 
kept thinking we didn't update anything.  I also added back in the setting of 
dCursorMixinClass to the beginning of the bizobj.  It doesn't hurt anything but 
will help in the odd instance we reference it before setting the connection (at 
which point we inject the class from the cursor factory).


Diff:
Modified: trunk/dabo/biz/dBizobj.py
===================================================================
--- trunk/dabo/biz/dBizobj.py   2012-10-14 21:33:26 UTC (rev 7282)
+++ trunk/dabo/biz/dBizobj.py   2012-10-17 02:14:27 UTC (rev 7283)
@@ -21,6 +21,8 @@
 
 class dBizobj(dObject):
        """ The middle tier, where the business logic resides."""
+       # Class to instantiate for the cursor object
+       dCursorMixinClass = dCursorMixin
        # Tell dObject that we'll call before and afterInit manually:
        _call_beforeInit, _call_afterInit, _call_initProperties = False, False, 
False
 

Modified: trunk/dabo/db/dbMySQL.py
===================================================================
--- trunk/dabo/db/dbMySQL.py    2012-10-14 21:33:26 UTC (rev 7282)
+++ trunk/dabo/db/dbMySQL.py    2012-10-17 02:14:27 UTC (rev 7283)
@@ -13,10 +13,10 @@
        def execute(self, sql, params=None, errorClass=None, 
convertQMarks=False):
                from MySQLdb import OperationalError
                try:
-                       super(MySQLAutoReconnectCursor, self).execute(sql, 
params=params, errorClass=OperationalError, convertQMarks=convertQMarks)
+                       return super(MySQLAutoReconnectCursor, 
self).execute(sql, params=params, errorClass=OperationalError, 
convertQMarks=convertQMarks)
                except OperationalError:
                        self.connection.ping(True)
-                       super(MySQLAutoReconnectCursor, self).execute(sql, 
params=params, errorClass=None, convertQMarks=convertQMarks)
+                       return super(MySQLAutoReconnectCursor, 
self).execute(sql, params=params, errorClass=None, convertQMarks=convertQMarks)
 
 
 class MySQL(dBackend):



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to