summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/tostring.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2013-01-26 15:10:06 -0800
committerLance Stout <lancestout@gmail.com>2013-01-26 15:15:01 -0800
commit23f112602c35440ca7a43cfd1efb0d3e15220a02 (patch)
treedb37cbc19a3a2d56b85ca9ee3ce17e5b78e6e111 /sleekxmpp/xmlstream/tostring.py
parent639a3aa8327068bdfce3ffb72fd6ac2f058fea69 (diff)
downloadslixmpp-23f112602c35440ca7a43cfd1efb0d3e15220a02.tar.gz
slixmpp-23f112602c35440ca7a43cfd1efb0d3e15220a02.tar.bz2
slixmpp-23f112602c35440ca7a43cfd1efb0d3e15220a02.tar.xz
slixmpp-23f112602c35440ca7a43cfd1efb0d3e15220a02.zip
Get tests to pass again.
Re-add old gmail_notify plugin for now.
Diffstat (limited to 'sleekxmpp/xmlstream/tostring.py')
-rw-r--r--sleekxmpp/xmlstream/tostring.py6
1 files changed, 3 insertions, 3 deletions
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.