From aa7428879b44d1a9d0c4ddcf57b2325047973c4f Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Wed, 15 Oct 2014 16:16:16 +0200 Subject: [PATCH] ERP5Catalog.CatalogTool: Fix variable naming. "to split" is an irregular verb. Also, drop badly-worded comment. --- product/ERP5Catalog/CatalogTool.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/product/ERP5Catalog/CatalogTool.py b/product/ERP5Catalog/CatalogTool.py index ed3b36488b..c6b5cace62 100644 --- a/product/ERP5Catalog/CatalogTool.py +++ b/product/ERP5Catalog/CatalogTool.py @@ -910,15 +910,13 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): strict = 1 key = key[len(strict_string):] prefix = prefix + strict_string - splitted_key = key.split('_') - # look from the end of the key from the beginning if we - # can find 'title', or 'portal_type'... - for i in xrange(len(splitted_key) - 1, 0, -1): - expected_base_cat_id = '_'.join(splitted_key[0:i]) + split_key = key.split('_') + for i in xrange(len(split_key) - 1, 0, -1): + expected_base_cat_id = '_'.join(split_key[0:i]) if expected_base_cat_id != 'parent' and \ expected_base_cat_id in base_cat_id_list: # We have found a base_category - end_key = '_'.join(splitted_key[i:]) + end_key = '_'.join(split_key[i:]) related = end_key.startswith(related_string) if related: end_key = end_key[len(related_string):] -- 2.30.9