dabo Commit
Revision 3656
Date: 2007-11-11 13:20:45 -0800 (Sun, 11 Nov 2007)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3656
Changed:
U trunk/dabo/db/dCursorMixin.py
Log:
Corrected a type error in the loggin process. If params contained non-string
values, the .join() function would throw an error.
Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py 2007-11-11 18:07:01 UTC (rev 3655)
+++ trunk/dabo/db/dCursorMixin.py 2007-11-11 21:20:45 UTC (rev 3656)
@@ -279,6 +279,7 @@
sql = unicode(sql, self.Encoding)
# Some backends, notably Firebird, require that fields be
specially marked.
sql = self.processFields(sql)
+ paramStr = ["%s" % p for p in params]
try:
if params is None or len(params) == 0:
@@ -288,14 +289,15 @@
else:
res = self.superCursor.execute(self, sql,
params)
if not self.IsPrefCursor:
- dabo.dbActivityLog.write("SQL: %s,
PARAMS: %s" % (sql.replace("\n", " "), ", ".join(params)))
+ dabo.dbActivityLog.write("SQL: %s,
PARAMS: %s" % (sql.replace("\n", " "), ", ".join(paramStr)))
except Exception, e:
# There can be cases where errors are expected. In
those cases, the
# calling routine will pass the class of the expected
error, and will
# handle it appropriately.
if errorClass is not None and isinstance(e, errorClass):
raise errorClass, e
- dabo.dbActivityLog.write("FAILED SQL: %s, PARAMS: %s" %
(sql.replace("\n", " "), ", ".join(params)))
+ paramStr = ["%s" % p for p in params]
+ dabo.dbActivityLog.write("FAILED SQL: %s, PARAMS: %s" %
(sql.replace("\n", " "), ", ".join(paramStr)))
# If this is due to a broken connection, let the user
know.
# Different backends have different messages, but they
# should all contain the string 'connect' in them.
_______________________________________________
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/dabo-dev/[EMAIL PROTECTED]