diff options
author | mathieui <mathieui@mathieui.net> | 2015-02-23 19:43:23 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2015-02-24 22:46:07 +0100 |
commit | 18a4978456a33e6ea38de1e07b1aa43bcc10d45f (patch) | |
tree | 97a294b7eb630b5e447d189133f1a237a0d8f24c | |
parent | 17464b10a42d9b3c4daba763e06e53c429478abd (diff) | |
download | slixmpp-18a4978456a33e6ea38de1e07b1aa43bcc10d45f.tar.gz slixmpp-18a4978456a33e6ea38de1e07b1aa43bcc10d45f.tar.bz2 slixmpp-18a4978456a33e6ea38de1e07b1aa43bcc10d45f.tar.xz slixmpp-18a4978456a33e6ea38de1e07b1aa43bcc10d45f.zip |
XEP-0258: wrap get_catalog() with coroutine_wrapper
-rw-r--r-- | slixmpp/plugins/xep_0258/security_labels.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/slixmpp/plugins/xep_0258/security_labels.py b/slixmpp/plugins/xep_0258/security_labels.py index 2fb048c7..56916147 100644 --- a/slixmpp/plugins/xep_0258/security_labels.py +++ b/slixmpp/plugins/xep_0258/security_labels.py @@ -9,6 +9,7 @@ import logging from slixmpp import Iq, Message +from slixmpp import coroutine_wrapper from slixmpp.plugins import BasePlugin from slixmpp.xmlstream import register_stanza_plugin from slixmpp.plugins.xep_0258 import stanza, SecurityLabel, Catalog @@ -34,11 +35,12 @@ class XEP_0258(BasePlugin): def session_bind(self, jid): self.xmpp['xep_0030'].add_feature(SecurityLabel.namespace) - def get_catalog(self, jid, ifrom=None, + @coroutine_wrapper + def get_catalog(self, jid, ifrom=None, coroutine=False, callback=None, timeout=None): iq = self.xmpp.Iq() iq['to'] = jid iq['from'] = ifrom iq['type'] = 'get' iq.enable('security_label_catalog') - return iq.send(callback=callback, timeout=timeout) + return iq.send(callback=callback, timeout=timeout, coroutine=coroutine) |