From 4e05b397c7371f2fc429a8db65d2eaa8843d23e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Sat, 5 Nov 2005 21:39:39 +0000 Subject: [PATCH] * fix: speed more important than gaining a single line --- pisi/xmlfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pisi/xmlfile.py b/pisi/xmlfile.py index bbe36959..2f7ca0c2 100644 --- a/pisi/xmlfile.py +++ b/pisi/xmlfile.py @@ -687,11 +687,12 @@ class autoxml(oo.autosuper, oo.autoprop): #print node, tag + '/' + comp_tag, nodes if len(nodes)==0 and req==mandatory: errs.append(where + _('Mandatory list empty')) - for ix in range(len(nodes)): - node = nodes[ix] + ix = 1 + for node in range(nodes): dummy = node.ownerDocument.createElement("Dummy") dummy.appendChild(node) l.append(decode_item(dummy, errs, where + unicode("[%s]" % ix))) + ix += 1 return l def encode(node, l, errs):