From cf24b870b124be3f41c496aa2a99b4c6f626e22f Mon Sep 17 00:00:00 2001
From: Sandro Munda <sandro.munda@guardis.com>
Date: Mon, 4 Jun 2012 08:03:08 +0200
Subject: Registered stanza plugin in the stanza module

---
 sleekxmpp/plugins/xep_0065/__init__.py |  3 ---
 sleekxmpp/plugins/xep_0065/proxy.py    | 12 ++----------
 sleekxmpp/plugins/xep_0065/stanza.py   |  9 ++++++---
 3 files changed, 8 insertions(+), 16 deletions(-)

(limited to 'sleekxmpp/plugins')

diff --git a/sleekxmpp/plugins/xep_0065/__init__.py b/sleekxmpp/plugins/xep_0065/__init__.py
index 8f5dfa6b..e1066005 100644
--- a/sleekxmpp/plugins/xep_0065/__init__.py
+++ b/sleekxmpp/plugins/xep_0065/__init__.py
@@ -1,6 +1,3 @@
-"""
-"""
-
 from sleekxmpp.plugins.base import register_plugin
 from sleekxmpp.plugins.xep_0065.proxy import xep_0065
 
diff --git a/sleekxmpp/plugins/xep_0065/proxy.py b/sleekxmpp/plugins/xep_0065/proxy.py
index f33f7840..d9d629f6 100644
--- a/sleekxmpp/plugins/xep_0065/proxy.py
+++ b/sleekxmpp/plugins/xep_0065/proxy.py
@@ -8,23 +8,15 @@ from select import select
 from uuid import uuid4
 
 from sleekxmpp.plugins.base import base_plugin
-from sleekxmpp import Iq
-from sleekxmpp.xmlstream import register_stanza_plugin
 from sleekxmpp.xmlstream.handler import Callback
 from sleekxmpp.xmlstream.matcher import StanzaPath
-
 from socks import socksocket, PROXY_TYPE_SOCKS5
 
-from stanza import Query, StreamHost, StreamHostUsed
+import stanza
 
-# Register the sleekxmpp logger
+# Registers the sleekxmpp logger
 log = logging.getLogger(__name__)
 
-# Register xep_0065 stanzas
-register_stanza_plugin(Iq, Query)
-register_stanza_plugin(Query, StreamHost)
-register_stanza_plugin(Query, StreamHostUsed)
-
 
 class xep_0065(base_plugin):
     """
diff --git a/sleekxmpp/plugins/xep_0065/stanza.py b/sleekxmpp/plugins/xep_0065/stanza.py
index ef70a368..0990a509 100644
--- a/sleekxmpp/plugins/xep_0065/stanza.py
+++ b/sleekxmpp/plugins/xep_0065/stanza.py
@@ -1,4 +1,6 @@
-from sleekxmpp.xmlstream import ElementBase
+from sleekxmpp import Iq
+from sleekxmpp.xmlstream import ElementBase, register_stanza_plugin
+
 
 # The protocol namespace defined in the Socks5Bytestream (0065) spec.
 namespace = 'http://jabber.org/protocol/bytestreams'
@@ -34,5 +36,6 @@ class Query(ElementBase):
     interfaces = set(('sid', 'activate'))
     sub_interfaces = set(('activate',))
 
-
-
+register_stanza_plugin(Iq, Query)
+register_stanza_plugin(Query, StreamHost)
+register_stanza_plugin(Query, StreamHostUsed)
-- 
cgit v1.2.3