From 4fb77ac8787422169566d613562127acf75a427b Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sat, 6 Nov 2010 01:28:59 -0400 Subject: Logging no longer uses root logger. Each module should now log into its own logger. --- sleekxmpp/componentxmpp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sleekxmpp/componentxmpp.py') diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index 3fcb88d9..8b0b6cc0 100644 --- a/sleekxmpp/componentxmpp.py +++ b/sleekxmpp/componentxmpp.py @@ -22,6 +22,9 @@ from sleekxmpp.xmlstream.matcher import * from sleekxmpp.xmlstream.handler import * +log = logging.getLogger(__name__) + + class ComponentXMPP(BaseXMPP): """ @@ -82,7 +85,7 @@ class ComponentXMPP(BaseXMPP): Overrides XMLStream.connect. """ - logging.debug("Connecting to %s:%s" % (self.server_host, + log.debug("Connecting to %s:%s" % (self.server_host, self.server_port)) return XMLStream.connect(self, self.server_host, self.server_port) -- cgit v1.2.3 From 9dbf246f0bfcac2c4ce538431ee629f126c86447 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 8 Nov 2010 09:14:17 +0800 Subject: Doesn't fail if host has NO SRV record Just catch an other exception type coming from the dns resolver that could be raised with hosts like "anon.example.com" which just don't have any SRV record. --- sleekxmpp/componentxmpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sleekxmpp/componentxmpp.py') diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index 8b0b6cc0..ae58c5f2 100644 --- a/sleekxmpp/componentxmpp.py +++ b/sleekxmpp/componentxmpp.py @@ -15,7 +15,7 @@ import hashlib from sleekxmpp import plugins from sleekxmpp import stanza -from sleekxmpp.basexmpp import BaseXMPP, SRV_SUPPORT +from sleekxmpp.basexmpp import BaseXMPP from sleekxmpp.xmlstream import XMLStream, RestartStream from sleekxmpp.xmlstream import StanzaBase, ET from sleekxmpp.xmlstream.matcher import * -- cgit v1.2.3 From 673545c7e48d86b02f811ad239ed317e4bca0bbc Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 26 Oct 2010 23:47:17 -0400 Subject: First pass at integrating the new roster manager. --- sleekxmpp/componentxmpp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sleekxmpp/componentxmpp.py') diff --git a/sleekxmpp/componentxmpp.py b/sleekxmpp/componentxmpp.py index ae58c5f2..0963c502 100644 --- a/sleekxmpp/componentxmpp.py +++ b/sleekxmpp/componentxmpp.py @@ -58,7 +58,7 @@ class ComponentXMPP(BaseXMPP): default_ns = 'jabber:client' else: default_ns = 'jabber:component:accept' - BaseXMPP.__init__(self, default_ns) + BaseXMPP.__init__(self, jid, default_ns) self.auto_authorize = None self.stream_header = "" % ( @@ -68,8 +68,8 @@ class ComponentXMPP(BaseXMPP): self.stream_footer = "" self.server_host = host self.server_port = port - self.set_jid(jid) self.secret = secret + self.plugin_config = plugin_config self.plugin_whitelist = plugin_whitelist self.is_component = True -- cgit v1.2.3