summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/stanzabase.py
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-05-24 19:34:49 -0700
committerNathan Fritz <nathan@andyet.net>2010-05-24 19:34:49 -0700
commitf165b4b52b3bbf1989a6144c3e6417f3756c62b6 (patch)
tree84ec8915c1676a4791309ebc82f861f49a4e8c0a /sleekxmpp/xmlstream/stanzabase.py
parent7ebc0065167189186ddf53e81a47dab887c87a72 (diff)
parent5ca4ede5ac1ddbc56e97010a2f39ed6ada37817e (diff)
downloadslixmpp-f165b4b52b3bbf1989a6144c3e6417f3756c62b6.tar.gz
slixmpp-f165b4b52b3bbf1989a6144c3e6417f3756c62b6.tar.bz2
slixmpp-f165b4b52b3bbf1989a6144c3e6417f3756c62b6.tar.xz
slixmpp-f165b4b52b3bbf1989a6144c3e6417f3756c62b6.zip
Merge branch 'master' of git@github.com:fritzy/SleekXMPP
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index 018e81c3..3f3f5e08 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -332,7 +332,7 @@ class StanzaBase(ElementBase):
def setType(self, value):
if value in self.types:
- self.xml.attrib['type'] = value
+ self.xml.attrib['type'] = value
return self
def getPayload(self):
@@ -340,15 +340,18 @@ class StanzaBase(ElementBase):
def setPayload(self, value):
self.xml.append(value)
+ return self
def delPayload(self):
self.clear()
+ return self
def clear(self):
for child in self.xml.getchildren():
self.xml.remove(child)
for plugin in list(self.plugins.keys()):
del self.plugins[plugin]
+ return self
def reply(self):
self['from'], self['to'] = self['to'], self['from']
@@ -357,6 +360,7 @@ class StanzaBase(ElementBase):
def error(self):
self['type'] = 'error'
+ return self
def getTo(self):
return JID(self._getAttr('to'))