[Erp5-report] r22525 - /erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jul 17 16:30:40 CEST 2008
Author: vincent
Date: Thu Jul 17 16:30:39 2008
New Revision: 22525
URL: http://svn.erp5.org?rev=22525&view=rev
Log:
Do not reinvent string.join . Use it.
Modified:
erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
Modified: erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SQLCatalog.py?rev=22525&r1=22524&r2=22525&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SQLCatalog.py (original)
+++ erp5/trunk/products/ZSQLCatalog/SQLCatalog.py Thu Jul 17 16:30:39 2008
@@ -2104,12 +2104,7 @@
if len(available_index_list) > 0:
# tell mysql to use these index
table = from_table_dict.pop(related_table)
- index_list_string = ""
- for index in available_index_list:
- if len(index_list_string) == 0:
- index_list_string += "%s" %index
- else:
- index_list_string += ", %s" %index
+ index_list_string = ', '.join(available_index_list)
table_with_index = "%s use index(%s)" %(related_table, index_list_string)
from_table_dict[table_with_index] = table
More information about the Erp5-report
mailing list