summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/xmlstream.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-09-24 20:59:51 -0700
committerLance Stout <lancestout@gmail.com>2012-09-24 20:59:51 -0700
commit6c57bb055346384760129c25ad5402913982eaac (patch)
treef89eea2ee3836a64ee893bcd269d8f008e9158e6 /sleekxmpp/xmlstream/xmlstream.py
parentc2ae1ee8910a60902ec4aa709ef7c26376eede47 (diff)
downloadslixmpp-6c57bb055346384760129c25ad5402913982eaac.tar.gz
slixmpp-6c57bb055346384760129c25ad5402913982eaac.tar.bz2
slixmpp-6c57bb055346384760129c25ad5402913982eaac.tar.xz
slixmpp-6c57bb055346384760129c25ad5402913982eaac.zip
Simplify stringifying XML
Diffstat (limited to 'sleekxmpp/xmlstream/xmlstream.py')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index a58b63d4..dff32461 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -1244,7 +1244,9 @@ class XMLStream(object):
data = filter(data)
if data is None:
return
- str_data = str(data)
+ str_data = tostring(data.xml, xmlns=self.default_ns,
+ stream=self,
+ top_level=True)
self.send_raw(str_data, now)
else:
self.send_raw(data, now)