summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorLance Stout <lstout@kestrel.cs.clemson.edu>2010-08-24 09:44:09 -0400
committerLance Stout <lstout@kestrel.cs.clemson.edu>2010-08-24 09:44:09 -0400
commit2fa58a74ab2d9f5f84edc036ea89f0b203e3f7e9 (patch)
tree6b849a321cdaf4f05c8fdfe11f719aec711877bf /sleekxmpp/xmlstream
parentc8f406d1b3e53aafdf549c93f3eeb44910c7f580 (diff)
downloadslixmpp-2fa58a74ab2d9f5f84edc036ea89f0b203e3f7e9.tar.gz
slixmpp-2fa58a74ab2d9f5f84edc036ea89f0b203e3f7e9.tar.bz2
slixmpp-2fa58a74ab2d9f5f84edc036ea89f0b203e3f7e9.tar.xz
slixmpp-2fa58a74ab2d9f5f84edc036ea89f0b203e3f7e9.zip
Fixed indenting issue.
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index b95d837f..bccb1fb0 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -355,24 +355,24 @@ class ElementBase(object):
return self.xml.attrib.get(name, default)
def _getSubText(self, name, default=''):
- """
- Return the text contents of a sub element.
-
- 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
- if no other default is supplied.
-
- Arguments:
- name -- The name or XPath expression of the element.
- default -- Optional default to return if the element does
- not exists. An empty string is returned otherwise.
- """
- name = self._fix_ns(name)
- stanza = self.xml.find(name)
- if stanza is None or stanza.text is None:
- return default
- else:
- return stanza.text
+ """
+ Return the text contents of a sub element.
+
+ 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
+ if no other default is supplied.
+
+ Arguments:
+ name -- The name or XPath expression of the element.
+ default -- Optional default to return if the element does
+ not exists. An empty string is returned otherwise.
+ """
+ name = self._fix_ns(name)
+ stanza = self.xml.find(name)
+ if stanza is None or stanza.text is None:
+ return default
+ else:
+ return stanza.text
def _setSubText(self, name, text=None, keep=False):
"""