Fixed indenting issue.

This commit is contained in:
Lance Stout 2010-08-24 09:44:09 -04:00
parent c8f406d1b3
commit 2fa58a74ab

View file

@ -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):
""" """