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:
committed by
Nathan Fritz
parent
828cba875f
commit
35f4ef3452
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user