Commit 6707b95f authored by Nicolas Dumazet's avatar Nicolas Dumazet

avoid a few dictionary lookups


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32722 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cfb770d6
......@@ -495,9 +495,10 @@ class XMLMatrix(Folder):
return None
i = 0
base_item = self.index[base_id]
for my_id in kw:
if self.index[base_id][i].has_key(my_id):
cell_id += '_%s' % self.index[base_id][i][my_id]
if base_item[i].has_key(my_id):
cell_id += '_%s' % base_item[i][my_id]
i += 1
else:
raise KeyError, 'Invalid key: %s' % str(kw)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment