diff options
author | Lance Stout <lancestout@gmail.com> | 2012-02-17 14:59:56 -0800 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-02-17 14:59:56 -0800 |
commit | 7d74a7b0271c709e80f1c25e67a57dcc98d5280a (patch) | |
tree | f1cd5d6130c8a60d943833eba36ca4c6d600e5cb /sleekxmpp | |
parent | 9d5eb864d1a370a32f933a77b48363950542c759 (diff) | |
download | slixmpp-7d74a7b0271c709e80f1c25e67a57dcc98d5280a.tar.gz slixmpp-7d74a7b0271c709e80f1c25e67a57dcc98d5280a.tar.bz2 slixmpp-7d74a7b0271c709e80f1c25e67a57dcc98d5280a.tar.xz slixmpp-7d74a7b0271c709e80f1c25e67a57dcc98d5280a.zip |
More extraneous import cleanup.
Diffstat (limited to 'sleekxmpp')
15 files changed, 17 insertions, 39 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py index ce55eff7..f729132d 100644 --- a/sleekxmpp/basexmpp.py +++ b/sleekxmpp/basexmpp.py @@ -18,7 +18,7 @@ import sys import logging import sleekxmpp -from sleekxmpp import plugins, roster +from sleekxmpp import plugins, features, roster from sleekxmpp.exceptions import IqError, IqTimeout from sleekxmpp.stanza import Message, Presence, Iq, StreamError @@ -204,12 +204,12 @@ class BaseXMPP(XMLStream): # Import the given module that contains the plugin. if not module: try: - module = sleekxmpp.plugins + module = plugins module = __import__( str("%s.%s" % (module.__name__, plugin)), globals(), locals(), [str(plugin)]) except ImportError: - module = sleekxmpp.features + module = features module = __import__( str("%s.%s" % (module.__name__, plugin)), globals(), locals(), [str(plugin)]) diff --git a/sleekxmpp/features/feature_bind/bind.py b/sleekxmpp/features/feature_bind/bind.py index 72897131..7df8fee1 100644 --- a/sleekxmpp/features/feature_bind/bind.py +++ b/sleekxmpp/features/feature_bind/bind.py @@ -11,8 +11,6 @@ import logging from sleekxmpp.stanza import Iq, StreamFeatures from sleekxmpp.features.feature_bind import stanza from sleekxmpp.xmlstream import register_stanza_plugin -from sleekxmpp.xmlstream.matcher import * -from sleekxmpp.xmlstream.handler import * from sleekxmpp.plugins.base import base_plugin diff --git a/sleekxmpp/features/feature_bind/stanza.py b/sleekxmpp/features/feature_bind/stanza.py index 2c1484e0..8ce7536f 100644 --- a/sleekxmpp/features/feature_bind/stanza.py +++ b/sleekxmpp/features/feature_bind/stanza.py @@ -6,8 +6,7 @@ See the file LICENSE for copying permission. """ -from sleekxmpp.stanza import Iq, StreamFeatures -from sleekxmpp.xmlstream import ElementBase, ET, register_stanza_plugin +from sleekxmpp.xmlstream import ElementBase class Bind(ElementBase): diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py index 5df1ea63..da235e26 100644 --- a/sleekxmpp/features/feature_mechanisms/mechanisms.py +++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py @@ -13,8 +13,8 @@ from sleekxmpp.thirdparty.suelta.exceptions import SASLCancelled, SASLError from sleekxmpp.stanza import StreamFeatures from sleekxmpp.xmlstream import RestartStream, register_stanza_plugin -from sleekxmpp.xmlstream.matcher import * -from sleekxmpp.xmlstream.handler import * +from sleekxmpp.xmlstream.matcher import MatchXPath +from sleekxmpp.xmlstream.handler import Callback from sleekxmpp.plugins.base import base_plugin from sleekxmpp.features.feature_mechanisms import stanza diff --git a/sleekxmpp/features/feature_mechanisms/stanza/abort.py b/sleekxmpp/features/feature_mechanisms/stanza/abort.py index a259a197..aaca348d 100644 --- a/sleekxmpp/features/feature_mechanisms/stanza/abort.py +++ b/sleekxmpp/features/feature_mechanisms/stanza/abort.py @@ -6,9 +6,7 @@ See the file LICENSE for copying permission. """ -from sleekxmpp.stanza import StreamFeatures -from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET -from sleekxmpp.xmlstream import register_stanza_plugin +from sleekxmpp.xmlstream import StanzaBase class Abort(StanzaBase): diff --git a/sleekxmpp/features/feature_mechanisms/stanza/auth.py b/sleekxmpp/features/feature_mechanisms/stanza/auth.py index a366f72a..69769507 100644 --- a/sleekxmpp/features/feature_mechanisms/stanza/auth.py +++ b/sleekxmpp/features/feature_mechanisms/stanza/auth.py @@ -10,9 +10,7 @@ import base64 from sleekxmpp.thirdparty.suelta.util import bytes -from sleekxmpp.stanza import StreamFeatures -from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET -from sleekxmpp.xmlstream import register_stanza_plugin +from sleekxmpp.xmlstream import StanzaBase class Auth(StanzaBase): diff --git a/sleekxmpp/features/feature_mechanisms/stanza/challenge.py b/sleekxmpp/features/feature_mechanisms/stanza/challenge.py index 342463e1..85d65403 100644 --- a/sleekxmpp/features/feature_mechanisms/stanza/challenge.py +++ b/sleekxmpp/features/feature_mechanisms/stanza/challenge.py @@ -10,9 +10,7 @@ import base64 from sleekxmpp.thirdparty.suelta.util import bytes -from sleekxmpp.stanza import StreamFeatures -from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET -from sleekxmpp.xmlstream import register_stanza_plugin +from sleekxmpp.xmlstream import StanzaBase class Challenge(StanzaBase): diff --git a/sleekxmpp/features/feature_mechanisms/stanza/failure.py b/sleekxmpp/features/feature_mechanisms/stanza/failure.py index 027cc5af..5dd0de56 100644 --- a/sleekxmpp/features/feature_mechanisms/stanza/failure.py +++ b/sleekxmpp/features/feature_mechanisms/stanza/failure.py @@ -6,9 +6,7 @@ See the file LICENSE for copying permission. """ -from sleekxmpp.stanza import StreamFeatures -from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET -from sleekxmpp.xmlstream import register_stanza_plugin +from sleekxmpp.xmlstream import StanzaBase, ET class Failure(StanzaBase): diff --git a/sleekxmpp/features/feature_mechanisms/stanza/mechanisms.py b/sleekxmpp/features/feature_mechanisms/stanza/mechanisms.py index c09cafbd..bbd56813 100644 --- a/sleekxmpp/features/feature_mechanisms/stanza/mechanisms.py +++ b/sleekxmpp/features/feature_mechanisms/stanza/mechanisms.py @@ -6,9 +6,7 @@ See the file LICENSE for copying permission. """ -from sleekxmpp.stanza import StreamFeatures -from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET -from sleekxmpp.xmlstream import register_stanza_plugin +from sleekxmpp.xmlstream import ElementBase, ET class Mechanisms(ElementBase): diff --git a/sleekxmpp/features/feature_mechanisms/stanza/response.py b/sleekxmpp/features/feature_mechanisms/stanza/response.py index 65f35888..78636c9e 100644 --- a/sleekxmpp/features/feature_mechanisms/stanza/response.py +++ b/sleekxmpp/features/feature_mechanisms/stanza/response.py @@ -10,9 +10,7 @@ import base64 from sleekxmpp.thirdparty.suelta.util import bytes -from sleekxmpp.stanza import StreamFeatures -from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET -from sleekxmpp.xmlstream import register_stanza_plugin +from sleekxmpp.xmlstream import StanzaBase class Response(StanzaBase): diff --git a/sleekxmpp/features/feature_mechanisms/stanza/success.py b/sleekxmpp/features/feature_mechanisms/stanza/success.py index 028e28a3..7a5a73f2 100644 --- a/sleekxmpp/features/feature_mechanisms/stanza/success.py +++ b/sleekxmpp/features/feature_mechanisms/stanza/success.py @@ -6,9 +6,7 @@ See the file LICENSE for copying permission. """ -from sleekxmpp.stanza import StreamFeatures -from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET -from sleekxmpp.xmlstream import register_stanza_plugin +from sleekxmpp.xmlstream import StanzaBase class Success(StanzaBase): diff --git a/sleekxmpp/features/feature_session/session.py b/sleekxmpp/features/feature_session/session.py index 0daec5da..f2314c2b 100644 --- a/sleekxmpp/features/feature_session/session.py +++ b/sleekxmpp/features/feature_session/session.py @@ -10,8 +10,6 @@ import logging from sleekxmpp.stanza import Iq, StreamFeatures from sleekxmpp.xmlstream import register_stanza_plugin -from sleekxmpp.xmlstream.matcher import * -from sleekxmpp.xmlstream.handler import * from sleekxmpp.plugins.base import base_plugin from sleekxmpp.features.feature_session import stanza @@ -46,7 +44,7 @@ class feature_session(base_plugin): iq = self.xmpp.Iq() iq['type'] = 'set' iq.enable('session') - response = iq.send(now=True) + iq.send(now=True) self.xmpp.features.add('session') diff --git a/sleekxmpp/features/feature_session/stanza.py b/sleekxmpp/features/feature_session/stanza.py index 40ea583d..94e949ee 100644 --- a/sleekxmpp/features/feature_session/stanza.py +++ b/sleekxmpp/features/feature_session/stanza.py @@ -6,8 +6,7 @@ See the file LICENSE for copying permission. """ -from sleekxmpp.stanza import Iq, StreamFeatures -from sleekxmpp.xmlstream import ElementBase, ET, register_stanza_plugin +from sleekxmpp.xmlstream import ElementBase class Session(ElementBase): diff --git a/sleekxmpp/features/feature_starttls/stanza.py b/sleekxmpp/features/feature_starttls/stanza.py index 8b09ad94..b968e134 100644 --- a/sleekxmpp/features/feature_starttls/stanza.py +++ b/sleekxmpp/features/feature_starttls/stanza.py @@ -6,9 +6,7 @@ See the file LICENSE for copying permission. """ -from sleekxmpp.stanza import StreamFeatures from sleekxmpp.xmlstream import StanzaBase, ElementBase -from sleekxmpp.xmlstream import register_stanza_plugin class STARTTLS(ElementBase): diff --git a/sleekxmpp/features/feature_starttls/starttls.py b/sleekxmpp/features/feature_starttls/starttls.py index 4e2b6621..24ff7436 100644 --- a/sleekxmpp/features/feature_starttls/starttls.py +++ b/sleekxmpp/features/feature_starttls/starttls.py @@ -10,8 +10,8 @@ import logging from sleekxmpp.stanza import StreamFeatures from sleekxmpp.xmlstream import RestartStream, register_stanza_plugin -from sleekxmpp.xmlstream.matcher import * -from sleekxmpp.xmlstream.handler import * +from sleekxmpp.xmlstream.matcher import MatchXPath +from sleekxmpp.xmlstream.handler import Callback from sleekxmpp.plugins.base import base_plugin from sleekxmpp.features.feature_starttls import stanza |