summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-03-11 23:01:45 -0700
committerLance Stout <lancestout@gmail.com>2012-03-12 19:32:19 -0700
commit2f677c98f8d4ba5ab7e358ba751d5d376dba5484 (patch)
tree9c19e60d85a449b2199b55e68758b08f20861146
parent3fda053606c3e36943aab638359c59e33c878635 (diff)
downloadslixmpp-2f677c98f8d4ba5ab7e358ba751d5d376dba5484.tar.gz
slixmpp-2f677c98f8d4ba5ab7e358ba751d5d376dba5484.tar.bz2
slixmpp-2f677c98f8d4ba5ab7e358ba751d5d376dba5484.tar.xz
slixmpp-2f677c98f8d4ba5ab7e358ba751d5d376dba5484.zip
Move XEP-0086 to new system.
-rw-r--r--sleekxmpp/plugins/xep_0086/__init__.py11
-rw-r--r--sleekxmpp/plugins/xep_0086/legacy_error.py13
2 files changed, 17 insertions, 7 deletions
diff --git a/sleekxmpp/plugins/xep_0086/__init__.py b/sleekxmpp/plugins/xep_0086/__init__.py
index b021e2b5..94600e85 100644
--- a/sleekxmpp/plugins/xep_0086/__init__.py
+++ b/sleekxmpp/plugins/xep_0086/__init__.py
@@ -6,5 +6,14 @@
See the file LICENSE for copying permission.
"""
+from sleekxmpp.plugins.base import register_plugin
+
from sleekxmpp.plugins.xep_0086.stanza import LegacyError
-from sleekxmpp.plugins.xep_0086.legacy_error import xep_0086
+from sleekxmpp.plugins.xep_0086.legacy_error import XEP_0086
+
+
+register_plugin(XEP_0086)
+
+
+# Retain some backwards compatibility
+xep_0086 = XEP_0086
diff --git a/sleekxmpp/plugins/xep_0086/legacy_error.py b/sleekxmpp/plugins/xep_0086/legacy_error.py
index 25b98c5a..bed22ee2 100644
--- a/sleekxmpp/plugins/xep_0086/legacy_error.py
+++ b/sleekxmpp/plugins/xep_0086/legacy_error.py
@@ -8,11 +8,11 @@
from sleekxmpp.stanza import Error
from sleekxmpp.xmlstream import register_stanza_plugin
-from sleekxmpp.plugins.base import base_plugin
+from sleekxmpp.plugins import BasePlugin
from sleekxmpp.plugins.xep_0086 import stanza, LegacyError
-class xep_0086(base_plugin):
+class XEP_0086(BasePlugin):
"""
XEP-0086: Error Condition Mappings
@@ -33,10 +33,11 @@ class xep_0086(base_plugin):
iq['error']['legacy']['condition'] = ...
"""
- def plugin_init(self):
- self.xep = '0086'
- self.description = 'Error Condition Mappings'
- self.stanza = stanza
+ name = 'xep_0086'
+ description = 'XEP-0086: Error Condition Mappings'
+ dependencies = set()
+ stanza = stanza
+ def plugin_init(self):
register_stanza_plugin(Error, LegacyError,
overrides=self.config.get('override', True))