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 Nathan Fritz
parent 828cba875f
commit 35f4ef3452
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)