From 4d1f071f831183568147870302722e492d71d051 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 5 Aug 2010 23:11:22 -0400 Subject: Updated the use of tostring in xmlstream.py Now uses the xmlns and stream parameters to reduce the number of extra xmlns attributes used in the logging output. Added self.default_ns to XMLStream just to be safe. --- sleekxmpp/xmlstream/xmlstream.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sleekxmpp/xmlstream/xmlstream.py') diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index ffaa6514..bf39bb33 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -73,6 +73,7 @@ class XMLStream(object): self.use_ssl = False self.use_tls = False + self.default_ns = '' self.stream_header = "" self.stream_footer = "" @@ -304,7 +305,7 @@ class XMLStream(object): def __spawnEvent(self, xmlobj): "watching xmlOut and processes handlers" #convert XML into Stanza - logging.debug("RECV: %s" % tostring(xmlobj)) + logging.debug("RECV: %s" % tostring(xmlobj, xmlns=self.default_ns, stream=self)) xmlobj = self.incoming_filter(xmlobj) stanza_type = StanzaBase for stanza_class in self.__root_stanza: -- cgit v1.2.3