Modified the return values for several methods so that they can be chained.

For example:

    iq.reply().error().setPayload(something.xml).send()
This commit is contained in:
Lance Stout
2010-05-22 22:40:30 +08:00
committed by Thom Nichols
parent 040f426f1a
commit 520bf72e11
2 changed files with 6 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ class Iq(RootStanza):
def setPayload(self, value):
self.clear()
StanzaBase.setPayload(self, value)
return self
def setQuery(self, value):
query = self.xml.find("{%s}query" % value)