From ca2b4a188ac31d1bdf45ec244c950f7675414b38 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sat, 12 Feb 2011 11:01:43 -0500 Subject: [PATCH] Return the registered callback when using iq.send(callback=foo). Allows for a callback to be canceled by unregistering the returned handler. --- sleekxmpp/stanza/iq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)