From 11fb5f2136b68a90c9b353334b2f84682870ae29 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Mon, 30 Jun 2008 13:05:05 +0000 Subject: [PATCH] Replace a simple "for" loop by a list comprehension. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22079 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Tool/DomainTool.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/product/ERP5/Tool/DomainTool.py b/product/ERP5/Tool/DomainTool.py index 15188e33ee..10d982cbc6 100644 --- a/product/ERP5/Tool/DomainTool.py +++ b/product/ERP5/Tool/DomainTool.py @@ -81,14 +81,12 @@ class DomainTool(BaseTool): """ portal_catalog = context.portal_catalog portal_categories = context.portal_categories - column_list = [] + # Search the columns of the predicate table + column_list = [x.split('.')[1] for x in portal_catalog.getColumnIds() + if x.startswith('predicate.')] expression_list = [] checked_column_list = [] sql_kw = {} - # Search the columns of the predicate table - for column in portal_catalog.getColumnIds(): - if column.startswith('predicate.'): - column_list.append(column.split('.')[1]) for column in column_list: if column not in checked_column_list: range_property = 0 -- 2.30.9