From 6e35948276c36ea2696f0de64dc179a1073ee3a6 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 23 Feb 2015 19:32:48 +0100 Subject: XEP-0092: wrap get_version() with coroutine_wrapper --- slixmpp/plugins/xep_0092/version.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'slixmpp/plugins/xep_0092') diff --git a/slixmpp/plugins/xep_0092/version.py b/slixmpp/plugins/xep_0092/version.py index 9dbdc4e6..68c6a326 100644 --- a/slixmpp/plugins/xep_0092/version.py +++ b/slixmpp/plugins/xep_0092/version.py @@ -15,6 +15,7 @@ from slixmpp.xmlstream.handler import Callback from slixmpp.xmlstream.matcher import StanzaPath from slixmpp.plugins import BasePlugin from slixmpp.plugins.xep_0092 import Version, stanza +from slixmpp import coroutine_wrapper log = logging.getLogger(__name__) @@ -70,7 +71,9 @@ class XEP_0092(BasePlugin): iq['software_version']['os'] = self.os iq.send() - def get_version(self, jid, ifrom=None, timeout=None, callback=None): + @coroutine_wrapper + def get_version(self, jid, ifrom=None, timeout=None, callback=None, + coroutine=False): """ Retrieve the software version of a remote agent. @@ -82,4 +85,4 @@ class XEP_0092(BasePlugin): iq['from'] = ifrom iq['type'] = 'get' iq['query'] = Version.namespace - return iq.send(timeout=timeout, callback=callback) + return iq.send(timeout=timeout, callback=callback, coroutine=coroutine) -- cgit v1.2.3