diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-07-30 17:52:59 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-07-30 17:52:59 +0200 |
commit | ab03ad54aaca1725b943abf16585fa4ef6f08897 (patch) | |
tree | 66a18ee01a78b99dbcb5123ea09be523c766cc47 /slixmpp/plugins/xep_0049/private_storage.py | |
parent | 2e571ac95089f15df7eee8f29d519f2bef425d4d (diff) | |
download | slixmpp-ab03ad54aaca1725b943abf16585fa4ef6f08897.tar.gz slixmpp-ab03ad54aaca1725b943abf16585fa4ef6f08897.tar.bz2 slixmpp-ab03ad54aaca1725b943abf16585fa4ef6f08897.tar.xz slixmpp-ab03ad54aaca1725b943abf16585fa4ef6f08897.zip |
Fix the iq.send() function, and a bunch of places where it is called
This is a big-and-dirty commit with a bunch of cleanup, maybe breaking a few
things, and not fixing all iq.send() calls yet.
Diffstat (limited to 'slixmpp/plugins/xep_0049/private_storage.py')
-rw-r--r-- | slixmpp/plugins/xep_0049/private_storage.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/slixmpp/plugins/xep_0049/private_storage.py b/slixmpp/plugins/xep_0049/private_storage.py index 99a04fe9..a66c05d1 100644 --- a/slixmpp/plugins/xep_0049/private_storage.py +++ b/slixmpp/plugins/xep_0049/private_storage.py @@ -32,7 +32,8 @@ class XEP_0049(BasePlugin): def register(self, stanza): register_stanza_plugin(PrivateXML, stanza, iterable=True) - def store(self, data, ifrom=None, block=True, timeout=None, callback=None): + def store(self, data, ifrom=None, timeout=None, callback=None, + timeout_callback=None): iq = self.xmpp.Iq() iq['type'] = 'set' iq['from'] = ifrom @@ -43,11 +44,14 @@ class XEP_0049(BasePlugin): for elem in data: iq['private'].append(elem) - return iq.send(block=block, timeout=timeout, callback=callback) + return iq.send(timeout=timeout, callback=callback, + timeout_callback=timeout_callback) - def retrieve(self, name, ifrom=None, block=True, timeout=None, callback=None): + def retrieve(self, name, ifrom=None, timeout=None, callback=None, + timeout_callback=None): iq = self.xmpp.Iq() iq['type'] = 'get' iq['from'] = ifrom iq['private'].enable(name) - return iq.send(block=block, timeout=timeout, callback=callback) + return iq.send(timeout=timeout, callback=callback, + timeout_callback=timeout_callback) |