From 26621311244c3546aa9a48bfdfe65021fe0861ec Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 1 Oct 2010 12:41:35 -0400 Subject: Fixed tostring bug when using mapped namespaces. --- sleekxmpp/xmlstream/tostring/tostring.py | 2 +- sleekxmpp/xmlstream/tostring/tostring26.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sleekxmpp/xmlstream/tostring') diff --git a/sleekxmpp/xmlstream/tostring/tostring.py b/sleekxmpp/xmlstream/tostring/tostring.py index c2696321..d8f5c5b2 100644 --- a/sleekxmpp/xmlstream/tostring/tostring.py +++ b/sleekxmpp/xmlstream/tostring/tostring.py @@ -46,7 +46,7 @@ def tostring(xml=None, xmlns='', stanza_ns='', stream=None, outbuffer=''): if stream and tag_xmlns in stream.namespace_map: mapped_namespace = stream.namespace_map[tag_xmlns] if mapped_namespace: - tag = "%s:%s" % (mapped_namespace, tag_name) + tag_name = "%s:%s" % (mapped_namespace, tag_name) output.append("<%s" % tag_name) output.append(namespace) diff --git a/sleekxmpp/xmlstream/tostring/tostring26.py b/sleekxmpp/xmlstream/tostring/tostring26.py index 7a376374..0c02f922 100644 --- a/sleekxmpp/xmlstream/tostring/tostring26.py +++ b/sleekxmpp/xmlstream/tostring/tostring26.py @@ -49,7 +49,7 @@ def tostring(xml=None, xmlns='', stanza_ns='', stream=None, outbuffer=''): if stream and tag_xmlns in stream.namespace_map: mapped_namespace = stream.namespace_map[tag_xmlns] if mapped_namespace: - tag = u"%s:%s" % (mapped_namespace, tag_name) + tag_name = u"%s:%s" % (mapped_namespace, tag_name) output.append(u"<%s" % tag_name) output.append(namespace) -- cgit v1.2.3