mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
More extraneous import cleanup.
This commit is contained in:
parent
9d5eb864d1
commit
7d74a7b027
15 changed files with 17 additions and 39 deletions
|
@ -18,7 +18,7 @@ import sys
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import sleekxmpp
|
import sleekxmpp
|
||||||
from sleekxmpp import plugins, roster
|
from sleekxmpp import plugins, features, roster
|
||||||
from sleekxmpp.exceptions import IqError, IqTimeout
|
from sleekxmpp.exceptions import IqError, IqTimeout
|
||||||
|
|
||||||
from sleekxmpp.stanza import Message, Presence, Iq, StreamError
|
from sleekxmpp.stanza import Message, Presence, Iq, StreamError
|
||||||
|
@ -204,12 +204,12 @@ class BaseXMPP(XMLStream):
|
||||||
# Import the given module that contains the plugin.
|
# Import the given module that contains the plugin.
|
||||||
if not module:
|
if not module:
|
||||||
try:
|
try:
|
||||||
module = sleekxmpp.plugins
|
module = plugins
|
||||||
module = __import__(
|
module = __import__(
|
||||||
str("%s.%s" % (module.__name__, plugin)),
|
str("%s.%s" % (module.__name__, plugin)),
|
||||||
globals(), locals(), [str(plugin)])
|
globals(), locals(), [str(plugin)])
|
||||||
except ImportError:
|
except ImportError:
|
||||||
module = sleekxmpp.features
|
module = features
|
||||||
module = __import__(
|
module = __import__(
|
||||||
str("%s.%s" % (module.__name__, plugin)),
|
str("%s.%s" % (module.__name__, plugin)),
|
||||||
globals(), locals(), [str(plugin)])
|
globals(), locals(), [str(plugin)])
|
||||||
|
|
|
@ -11,8 +11,6 @@ import logging
|
||||||
from sleekxmpp.stanza import Iq, StreamFeatures
|
from sleekxmpp.stanza import Iq, StreamFeatures
|
||||||
from sleekxmpp.features.feature_bind import stanza
|
from sleekxmpp.features.feature_bind import stanza
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
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.plugins.base import base_plugin
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sleekxmpp.stanza import Iq, StreamFeatures
|
from sleekxmpp.xmlstream import ElementBase
|
||||||
from sleekxmpp.xmlstream import ElementBase, ET, register_stanza_plugin
|
|
||||||
|
|
||||||
|
|
||||||
class Bind(ElementBase):
|
class Bind(ElementBase):
|
||||||
|
|
|
@ -13,8 +13,8 @@ from sleekxmpp.thirdparty.suelta.exceptions import SASLCancelled, SASLError
|
||||||
|
|
||||||
from sleekxmpp.stanza import StreamFeatures
|
from sleekxmpp.stanza import StreamFeatures
|
||||||
from sleekxmpp.xmlstream import RestartStream, register_stanza_plugin
|
from sleekxmpp.xmlstream import RestartStream, register_stanza_plugin
|
||||||
from sleekxmpp.xmlstream.matcher import *
|
from sleekxmpp.xmlstream.matcher import MatchXPath
|
||||||
from sleekxmpp.xmlstream.handler import *
|
from sleekxmpp.xmlstream.handler import Callback
|
||||||
from sleekxmpp.plugins.base import base_plugin
|
from sleekxmpp.plugins.base import base_plugin
|
||||||
from sleekxmpp.features.feature_mechanisms import stanza
|
from sleekxmpp.features.feature_mechanisms import stanza
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sleekxmpp.stanza import StreamFeatures
|
from sleekxmpp.xmlstream import StanzaBase
|
||||||
from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET
|
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
|
||||||
|
|
||||||
|
|
||||||
class Abort(StanzaBase):
|
class Abort(StanzaBase):
|
||||||
|
|
|
@ -10,9 +10,7 @@ import base64
|
||||||
|
|
||||||
from sleekxmpp.thirdparty.suelta.util import bytes
|
from sleekxmpp.thirdparty.suelta.util import bytes
|
||||||
|
|
||||||
from sleekxmpp.stanza import StreamFeatures
|
from sleekxmpp.xmlstream import StanzaBase
|
||||||
from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET
|
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
|
||||||
|
|
||||||
|
|
||||||
class Auth(StanzaBase):
|
class Auth(StanzaBase):
|
||||||
|
|
|
@ -10,9 +10,7 @@ import base64
|
||||||
|
|
||||||
from sleekxmpp.thirdparty.suelta.util import bytes
|
from sleekxmpp.thirdparty.suelta.util import bytes
|
||||||
|
|
||||||
from sleekxmpp.stanza import StreamFeatures
|
from sleekxmpp.xmlstream import StanzaBase
|
||||||
from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET
|
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
|
||||||
|
|
||||||
|
|
||||||
class Challenge(StanzaBase):
|
class Challenge(StanzaBase):
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sleekxmpp.stanza import StreamFeatures
|
from sleekxmpp.xmlstream import StanzaBase, ET
|
||||||
from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET
|
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
|
||||||
|
|
||||||
|
|
||||||
class Failure(StanzaBase):
|
class Failure(StanzaBase):
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sleekxmpp.stanza import StreamFeatures
|
from sleekxmpp.xmlstream import ElementBase, ET
|
||||||
from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET
|
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
|
||||||
|
|
||||||
|
|
||||||
class Mechanisms(ElementBase):
|
class Mechanisms(ElementBase):
|
||||||
|
|
|
@ -10,9 +10,7 @@ import base64
|
||||||
|
|
||||||
from sleekxmpp.thirdparty.suelta.util import bytes
|
from sleekxmpp.thirdparty.suelta.util import bytes
|
||||||
|
|
||||||
from sleekxmpp.stanza import StreamFeatures
|
from sleekxmpp.xmlstream import StanzaBase
|
||||||
from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET
|
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
|
||||||
|
|
||||||
|
|
||||||
class Response(StanzaBase):
|
class Response(StanzaBase):
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sleekxmpp.stanza import StreamFeatures
|
from sleekxmpp.xmlstream import StanzaBase
|
||||||
from sleekxmpp.xmlstream import ElementBase, StanzaBase, ET
|
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
|
||||||
|
|
||||||
|
|
||||||
class Success(StanzaBase):
|
class Success(StanzaBase):
|
||||||
|
|
|
@ -10,8 +10,6 @@ import logging
|
||||||
|
|
||||||
from sleekxmpp.stanza import Iq, StreamFeatures
|
from sleekxmpp.stanza import Iq, StreamFeatures
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
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.plugins.base import base_plugin
|
||||||
|
|
||||||
from sleekxmpp.features.feature_session import stanza
|
from sleekxmpp.features.feature_session import stanza
|
||||||
|
@ -46,7 +44,7 @@ class feature_session(base_plugin):
|
||||||
iq = self.xmpp.Iq()
|
iq = self.xmpp.Iq()
|
||||||
iq['type'] = 'set'
|
iq['type'] = 'set'
|
||||||
iq.enable('session')
|
iq.enable('session')
|
||||||
response = iq.send(now=True)
|
iq.send(now=True)
|
||||||
|
|
||||||
self.xmpp.features.add('session')
|
self.xmpp.features.add('session')
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sleekxmpp.stanza import Iq, StreamFeatures
|
from sleekxmpp.xmlstream import ElementBase
|
||||||
from sleekxmpp.xmlstream import ElementBase, ET, register_stanza_plugin
|
|
||||||
|
|
||||||
|
|
||||||
class Session(ElementBase):
|
class Session(ElementBase):
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sleekxmpp.stanza import StreamFeatures
|
|
||||||
from sleekxmpp.xmlstream import StanzaBase, ElementBase
|
from sleekxmpp.xmlstream import StanzaBase, ElementBase
|
||||||
from sleekxmpp.xmlstream import register_stanza_plugin
|
|
||||||
|
|
||||||
|
|
||||||
class STARTTLS(ElementBase):
|
class STARTTLS(ElementBase):
|
||||||
|
|
|
@ -10,8 +10,8 @@ import logging
|
||||||
|
|
||||||
from sleekxmpp.stanza import StreamFeatures
|
from sleekxmpp.stanza import StreamFeatures
|
||||||
from sleekxmpp.xmlstream import RestartStream, register_stanza_plugin
|
from sleekxmpp.xmlstream import RestartStream, register_stanza_plugin
|
||||||
from sleekxmpp.xmlstream.matcher import *
|
from sleekxmpp.xmlstream.matcher import MatchXPath
|
||||||
from sleekxmpp.xmlstream.handler import *
|
from sleekxmpp.xmlstream.handler import Callback
|
||||||
from sleekxmpp.plugins.base import base_plugin
|
from sleekxmpp.plugins.base import base_plugin
|
||||||
from sleekxmpp.features.feature_starttls import stanza
|
from sleekxmpp.features.feature_starttls import stanza
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue