mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-27 19:19:54 +00:00
Fixed indenting issue.
This commit is contained in:
parent
c8f406d1b3
commit
2fa58a74ab
1 changed files with 16 additions and 16 deletions
|
@ -355,24 +355,24 @@ class ElementBase(object):
|
||||||
return self.xml.attrib.get(name, default)
|
return self.xml.attrib.get(name, default)
|
||||||
|
|
||||||
def _getSubText(self, name, default=''):
|
def _getSubText(self, name, default=''):
|
||||||
"""
|
"""
|
||||||
Return the text contents of a sub element.
|
Return the text contents of a sub element.
|
||||||
|
|
||||||
In case the element does not exist, or it has no textual content,
|
In case the element does not exist, or it has no textual content,
|
||||||
a default value can be returned instead. An empty string is returned
|
a default value can be returned instead. An empty string is returned
|
||||||
if no other default is supplied.
|
if no other default is supplied.
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
name -- The name or XPath expression of the element.
|
name -- The name or XPath expression of the element.
|
||||||
default -- Optional default to return if the element does
|
default -- Optional default to return if the element does
|
||||||
not exists. An empty string is returned otherwise.
|
not exists. An empty string is returned otherwise.
|
||||||
"""
|
"""
|
||||||
name = self._fix_ns(name)
|
name = self._fix_ns(name)
|
||||||
stanza = self.xml.find(name)
|
stanza = self.xml.find(name)
|
||||||
if stanza is None or stanza.text is None:
|
if stanza is None or stanza.text is None:
|
||||||
return default
|
return default
|
||||||
else:
|
else:
|
||||||
return stanza.text
|
return stanza.text
|
||||||
|
|
||||||
def _setSubText(self, name, text=None, keep=False):
|
def _setSubText(self, name, text=None, keep=False):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue