From f951aaba19f293e5ec0f0e75eac9e925bc42319f Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Thu, 18 Feb 2010 09:41:39 +0000
Subject: [PATCH] use enumerate

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32739 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/XMLMatrix.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/product/ERP5Type/XMLMatrix.py b/product/ERP5Type/XMLMatrix.py
index 737249e114..dcaecc8236 100644
--- a/product/ERP5Type/XMLMatrix.py
+++ b/product/ERP5Type/XMLMatrix.py
@@ -146,14 +146,12 @@ class XMLMatrix(Folder):
       base_id = kwd.get('base_id', "cell")
       if not self.index.has_key(base_id):
         return 0
-      i = 0
-      for my_id in kw:
+      for i, my_id in enumerate(kw):
         if self.index[base_id].has_key(i):
           if not self.index[base_id][i].has_key(my_id):
             return 0
         else:
           return 0
-        i += 1
 
       return 1
 
-- 
2.30.9