Commit 0ac2a6a6 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Remove unused methods

parent 91661540
Pipeline #8451 failed with stages
in 2 minutes and 44 seconds
......@@ -1444,15 +1444,6 @@ class Iq(Protocol):
return tag.getAttr('node')
return None
def getQueryPayload(self) -> Optional[list[Union[Node, str]]]:
"""
Return the 'query' child element payload
"""
tag = self.getQuery()
if tag:
return tag.getPayload()
return None
def getQueryChildren(self) -> Optional[list[Node]]:
"""
Return the 'query' child element child nodes
......
......@@ -324,25 +324,6 @@ class Node:
"""
return self.parent
def getPayload(self) -> List[Union[Node, str]]:
"""
Return the payload of node i.e. list of child nodes and CDATA entries.
F.e. for "<node>text1<nodea/><nodeb/> text2</node>" will be returned
list: ['text1', <nodea instance>, <nodeb instance>, ' text2']
"""
ret: List[Union[Node, str]] = []
for i in range(len(self.kids)+len(self.data)+1):
try:
if self.data[i]:
ret.append(self.data[i])
except IndexError:
pass
try:
ret.append(self.kids[i])
except IndexError:
pass
return ret
def getTag(self,
name: str,
attrs: Optional[Attrs] = None,
......
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