summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2013-01-20 13:54:01 -0800
committerLance Stout <lancestout@gmail.com>2013-01-20 13:54:01 -0800
commitd86adfa1b164293562e8b86dae7a82755b95626d (patch)
treec161469ca50347a39001d0a9e06a73821b708f2d /sleekxmpp/plugins
parent5e4b8bd67c25d670d406198c6b14a432ccb99239 (diff)
downloadslixmpp-d86adfa1b164293562e8b86dae7a82755b95626d.tar.gz
slixmpp-d86adfa1b164293562e8b86dae7a82755b95626d.tar.bz2
slixmpp-d86adfa1b164293562e8b86dae7a82755b95626d.tar.xz
slixmpp-d86adfa1b164293562e8b86dae7a82755b95626d.zip
Updated XEP-0092 to take callbacks and return the version result stanza.
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/xep_0092/version.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/sleekxmpp/plugins/xep_0092/version.py b/sleekxmpp/plugins/xep_0092/version.py
index 35813e1d..b16ad516 100644
--- a/sleekxmpp/plugins/xep_0092/version.py
+++ b/sleekxmpp/plugins/xep_0092/version.py
@@ -70,7 +70,7 @@ class XEP_0092(BasePlugin):
iq['software_version']['os'] = self.os
iq.send()
- def get_version(self, jid, ifrom=None):
+ def get_version(self, jid, ifrom=None, block=True, timeout=None, callback=None):
"""
Retrieve the software version of a remote agent.
@@ -82,14 +82,4 @@ class XEP_0092(BasePlugin):
iq['from'] = ifrom
iq['type'] = 'get'
iq['query'] = Version.namespace
-
- result = iq.send()
-
- if result and result['type'] != 'error':
- values = result['software_version'].values
- del values['lang']
- return values
- return False
-
-
-XEP_0092.getVersion = XEP_0092.get_version
+ return iq.send(block=block, timeout=timeout, callback=callback)