[elbe-devel] [PATCH 06/25] [V2] add an iter() implementation to treeutils
Manuel Traut
manut at linutronix.de
Fri Dec 8 19:08:37 CET 2017
this is needed to run with py2 and py3. It fixes
00:20:44.776 for c in def_xml.node("/preseed"):
00:20:44.776 TypeError: iter() returned non-iterator of type 'eiter'
if run in py2.
Signed-off-by: Manuel Traut <manut at linutronix.de>
---
elbepack/treeutils.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/elbepack/treeutils.py b/elbepack/treeutils.py
index 515655ff..bcbd415e 100644
--- a/elbepack/treeutils.py
+++ b/elbepack/treeutils.py
@@ -39,6 +39,9 @@ class eiter(object):
return elem(n)
+ def next(self):
+ return self.__next__()
+
class ebase(object):
def __init__(self, et):
self.et = et
--
2.15.1
More information about the elbe-devel
mailing list