Commit 70a3ac81 authored by Pavel Vainerman's avatar Pavel Vainerman Committed by Pavel Vainerman

[python]: fixed "__next__"

parent 59d6a9d0
...@@ -74,14 +74,14 @@ class UniXML(): ...@@ -74,14 +74,14 @@ class UniXML():
ret = self.findNode(node.children, nodestr, propstr) ret = self.findNode(node.children, nodestr, propstr)
if ret[0] != None: if ret[0] != None:
return ret return ret
node = node.__next__ node = node.next
return [None, None, None] return [None, None, None]
def findMyLevel(self, node, nodestr="", propstr=""): def findMyLevel(self, node, nodestr="", propstr=""):
while node != None: while node != None:
if node.name == nodestr: if node.name == nodestr:
return [node, node.name, node.prop(propstr)] return [node, node.name, node.prop(propstr)]
node = node.__next__ node = node.next
return [None, None, None] return [None, None, None]
def findNode_byProp(self, node, propstr, valuestr): def findNode_byProp(self, node, propstr, valuestr):
...@@ -91,12 +91,12 @@ class UniXML(): ...@@ -91,12 +91,12 @@ class UniXML():
ret = self.findNode_byProp(node.children, propstr, valuestr) ret = self.findNode_byProp(node.children, propstr, valuestr)
if ret[0] != None: if ret[0] != None:
return ret return ret
node = node.__next__ node = node.next
return [None, None, None] return [None, None, None]
def nextNode(self, node): def nextNode(self, node):
while node != None: while node != None:
node = node.__next__ node = node.next
if node == None: if node == None:
return node return node
if node.name != "text" and node.name != "comment": if node.name != "text" and node.name != "comment":
......
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