summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0030
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-02-14 16:26:23 -0500
committerLance Stout <lancestout@gmail.com>2011-02-14 16:26:23 -0500
commitd5b3a5282763e4f74816ff392bd8cd47dd9f7a95 (patch)
tree10b421c0cf9cf47997162485f35dabdccfffab69 /sleekxmpp/plugins/xep_0030
parent1a270dc05cc368000f3545975befa0589031b684 (diff)
parentd709f8db657aa1d1314082d842dd29e2546739c4 (diff)
downloadslixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.tar.gz
slixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.tar.bz2
slixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.tar.xz
slixmpp-d5b3a5282763e4f74816ff392bd8cd47dd9f7a95.zip
Merge branch 'develop' into stream_features
Conflicts: sleekxmpp/xmlstream/stanzabase.py
Diffstat (limited to 'sleekxmpp/plugins/xep_0030')
-rw-r--r--sleekxmpp/plugins/xep_0030/disco.py18
-rw-r--r--sleekxmpp/plugins/xep_0030/static.py1
2 files changed, 10 insertions, 9 deletions
diff --git a/sleekxmpp/plugins/xep_0030/disco.py b/sleekxmpp/plugins/xep_0030/disco.py
index a976b988..45d6931b 100644
--- a/sleekxmpp/plugins/xep_0030/disco.py
+++ b/sleekxmpp/plugins/xep_0030/disco.py
@@ -90,10 +90,6 @@ class xep_0030(base_plugin):
self.description = 'Service Discovery'
self.stanza = sleekxmpp.plugins.xep_0030.stanza
- # Retain some backwards compatibility
- self.getInfo = self.get_info
- self.getItems = self.get_items
-
self.xmpp.register_handler(
Callback('Disco Info',
StanzaPath('iq/disco_info'),
@@ -124,7 +120,8 @@ class xep_0030(base_plugin):
"""Handle cross-plugin dependencies."""
base_plugin.post_init(self)
if self.xmpp['xep_0059']:
- register_stanza_plugin(DiscoItems, self.xmpp['xep_0059'].stanza.Set)
+ register_stanza_plugin(DiscoItems,
+ self.xmpp['xep_0059'].stanza.Set)
def set_node_handler(self, htype, jid=None, node=None, handler=None):
"""
@@ -271,7 +268,7 @@ class xep_0030(base_plugin):
iq['type'] = 'get'
iq['disco_info']['node'] = node if node else ''
return iq.send(timeout=kwargs.get('timeout', None),
- block=kwargs.get('block', None),
+ block=kwargs.get('block', True),
callback=kwargs.get('callback', None))
def get_items(self, jid=None, node=None, local=False, **kwargs):
@@ -318,7 +315,7 @@ class xep_0030(base_plugin):
return self.xmpp['xep_0059'].iterate(iq, 'disco_items')
else:
return iq.send(timeout=kwargs.get('timeout', None),
- block=kwargs.get('block', None),
+ block=kwargs.get('block', True),
callback=kwargs.get('callback', None))
def set_items(self, jid=None, node=None, **kwargs):
@@ -378,7 +375,8 @@ class xep_0030(base_plugin):
"""
self._run_node_handler('del_item', jid, node, kwargs)
- def add_identity(self, category='', itype='', name='', node=None, jid=None, lang=None):
+ def add_identity(self, category='', itype='', name='',
+ node=None, jid=None, lang=None):
"""
Add a new identity to the given JID/node combination.
@@ -607,3 +605,7 @@ class xep_0030(base_plugin):
info.add_feature(info.namespace)
return info
+
+# Retain some backwards compatibility
+xep_0030.getInfo = xep_0030.get_info
+xep_0030.getItems = xep_0030.get_items
diff --git a/sleekxmpp/plugins/xep_0030/static.py b/sleekxmpp/plugins/xep_0030/static.py
index f957c84c..654a9bd0 100644
--- a/sleekxmpp/plugins/xep_0030/static.py
+++ b/sleekxmpp/plugins/xep_0030/static.py
@@ -262,4 +262,3 @@ class StaticDisco(object):
self.nodes[(jid, node)]['items'].del_item(
data.get('ijid', ''),
node=data.get('inode', None))
-