summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-02-12 11:01:43 -0500
committerLance Stout <lancestout@gmail.com>2011-02-12 11:01:43 -0500
commitca2b4a188ac31d1bdf45ec244c950f7675414b38 (patch)
treecd5196a6cbfc8d386651e45da8d3c960eb52f799 /sleekxmpp
parent0d326383799a7d7bb69fec9dcd1eaf9e1a64eab8 (diff)
downloadslixmpp-ca2b4a188ac31d1bdf45ec244c950f7675414b38.tar.gz
slixmpp-ca2b4a188ac31d1bdf45ec244c950f7675414b38.tar.bz2
slixmpp-ca2b4a188ac31d1bdf45ec244c950f7675414b38.tar.xz
slixmpp-ca2b4a188ac31d1bdf45ec244c950f7675414b38.zip
Return the registered callback when using iq.send(callback=foo).
Allows for a callback to be canceled by unregistering the returned handler.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/stanza/iq.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sleekxmpp/stanza/iq.py b/sleekxmpp/stanza/iq.py
index 841d282c..7a8b997b 100644
--- a/sleekxmpp/stanza/iq.py
+++ b/sleekxmpp/stanza/iq.py
@@ -195,7 +195,7 @@ class Iq(RootStanza):
once=True)
self.stream.register_handler(handler)
StanzaBase.send(self)
- return None
+ return handler
elif block and self['type'] in ('get', 'set'):
waitfor = Waiter('IqWait_%s' % self['id'], MatcherId(self['id']))
self.stream.register_handler(waitfor)