From 23f112602c35440ca7a43cfd1efb0d3e15220a02 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sat, 26 Jan 2013 15:10:06 -0800 Subject: Get tests to pass again. Re-add old gmail_notify plugin for now. --- sleekxmpp/xmlstream/tostring.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sleekxmpp/xmlstream') diff --git a/sleekxmpp/xmlstream/tostring.py b/sleekxmpp/xmlstream/tostring.py index f4157f7a..c49abd3e 100644 --- a/sleekxmpp/xmlstream/tostring.py +++ b/sleekxmpp/xmlstream/tostring.py @@ -92,7 +92,9 @@ def tostring(xml=None, xmlns='', stream=None, outbuffer='', else: attrib_ns = attrib.split('}')[0][1:] attrib = attrib.split('}')[1] - if stream and attrib_ns in stream.namespace_map: + if attrib_ns == XML_NS: + output.append(' xml:%s="%s"' % (attrib, value)) + elif stream and attrib_ns in stream.namespace_map: mapped_ns = stream.namespace_map[attrib_ns] if mapped_ns: if namespaces is None: @@ -104,8 +106,6 @@ def tostring(xml=None, xmlns='', stream=None, outbuffer='', mapped_ns, attrib_ns)) output.append(' %s:%s="%s"' % ( mapped_ns, attrib, value)) - elif attrib_ns == XML_NS: - output.append(' xml:%s="%s"' % (attrib, value)) if open_only: # Only output the opening tag, regardless of content. -- cgit v1.2.3