diff options
author | mathieui <mathieui@mathieui.net> | 2015-02-23 19:32:48 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2015-02-24 22:46:05 +0100 |
commit | 6e35948276c36ea2696f0de64dc179a1073ee3a6 (patch) | |
tree | f2f40a017d19aee58ca7cece6477eb131920704e | |
parent | 4da870fd191697d010e677eee32ef86439967353 (diff) | |
download | slixmpp-6e35948276c36ea2696f0de64dc179a1073ee3a6.tar.gz slixmpp-6e35948276c36ea2696f0de64dc179a1073ee3a6.tar.bz2 slixmpp-6e35948276c36ea2696f0de64dc179a1073ee3a6.tar.xz slixmpp-6e35948276c36ea2696f0de64dc179a1073ee3a6.zip |
XEP-0092: wrap get_version() with coroutine_wrapper
-rw-r--r-- | slixmpp/plugins/xep_0092/version.py | 7 |
1 files changed, 5 insertions, 2 deletions
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) |