[Erp5-report] r37268 jerome - /erp5/trunk/products/ZMySQLDA/db.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jul 26 13:24:39 CEST 2010
Author: jerome
Date: Mon Jul 26 13:24:33 2010
New Revision: 37268
URL: http://svn.erp5.org?rev=37268&view=rev
Log:
don't fail if query_string is empty
Modified:
erp5/trunk/products/ZMySQLDA/db.py
Modified: erp5/trunk/products/ZMySQLDA/db.py
URL: http://svn.erp5.org/erp5/trunk/products/ZMySQLDA/db.py?rev=37268&r1=37267&r2=37268&view=diff
==============================================================================
--- erp5/trunk/products/ZMySQLDA/db.py [utf8] (original)
+++ erp5/trunk/products/ZMySQLDA/db.py [utf8] Mon Jul 26 13:24:33 2010
@@ -444,7 +444,7 @@ class DB(TM):
# XXX deal with a typical mistake that the user appends
# an unnecessary and rather harmful semicolon at the end.
# Unfortunately, MySQLdb does not want to be graceful.
- if query_string[-1] == ';':
+ if query_string.endswith(';'):
query_string = query_string[:-1]
for qs in filter(None, map(strip,split(query_string, '\0'))):
qtype = upper(split(qs, None, 1)[0])
More information about the Erp5-report
mailing list