summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-04-03 10:58:31 -0700
committerLance Stout <lancestout@gmail.com>2012-04-06 15:09:26 -0400
commite0dd9c3618e92643ec323b162187e001673a59b7 (patch)
tree36c05efb5f42ddb9169e467b9980c1d87b4e48a2 /sleekxmpp
parent4921c44d0afc6d0f975e4ee1467b32b96bb576b7 (diff)
downloadslixmpp-e0dd9c3618e92643ec323b162187e001673a59b7.tar.gz
slixmpp-e0dd9c3618e92643ec323b162187e001673a59b7.tar.bz2
slixmpp-e0dd9c3618e92643ec323b162187e001673a59b7.tar.xz
slixmpp-e0dd9c3618e92643ec323b162187e001673a59b7.zip
Simplify registering API handler defaults.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/plugins/xep_0030/disco.py3
-rw-r--r--sleekxmpp/plugins/xep_0115/caps.py3
-rw-r--r--sleekxmpp/plugins/xep_0128/extended_disco.py3
3 files changed, 3 insertions, 6 deletions
diff --git a/sleekxmpp/plugins/xep_0030/disco.py b/sleekxmpp/plugins/xep_0030/disco.py
index 76824e1c..6f5b48d3 100644
--- a/sleekxmpp/plugins/xep_0030/disco.py
+++ b/sleekxmpp/plugins/xep_0030/disco.py
@@ -119,8 +119,7 @@ class XEP_0030(BasePlugin):
'get_cached_info', 'supports', 'has_identity']
for op in self._disco_ops:
- self.api.register(getattr(self.static, op), op)
- self.api.register_default(getattr(self.static, op), op)
+ self.api.register(getattr(self.static, op), op, default=True)
def _add_disco_op(self, op, default_handler):
self.api.register(default_handler, op)
diff --git a/sleekxmpp/plugins/xep_0115/caps.py b/sleekxmpp/plugins/xep_0115/caps.py
index 84881980..3509feec 100644
--- a/sleekxmpp/plugins/xep_0115/caps.py
+++ b/sleekxmpp/plugins/xep_0115/caps.py
@@ -78,8 +78,7 @@ class XEP_0115(BasePlugin):
self.static = StaticCaps(self.xmpp, disco.static)
for op in self._disco_ops:
- self.api.register(getattr(self.static, op), op)
- self.api.register_default(getattr(self.static, op), op)
+ self.api.register(getattr(self.static, op), op, default=True)
self._run_node_handler = disco._run_node_handler
diff --git a/sleekxmpp/plugins/xep_0128/extended_disco.py b/sleekxmpp/plugins/xep_0128/extended_disco.py
index 93f8e8f0..5adc2368 100644
--- a/sleekxmpp/plugins/xep_0128/extended_disco.py
+++ b/sleekxmpp/plugins/xep_0128/extended_disco.py
@@ -61,8 +61,7 @@ class XEP_0128(BasePlugin):
self.disco.del_extended_info = self.del_extended_info
for op in self._disco_ops:
- self.api.register(getattr(self.static, op), op)
- self.api.register_default(getattr(self.static, op), op)
+ self.api.register(getattr(self.static, op), op, default=True)
def set_extended_info(self, jid=None, node=None, **kwargs):
"""