summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Caruana <jp@barreverte.fr>2013-07-31 10:50:39 +0200
committerJean-Philippe Caruana <jp@barreverte.fr>2013-07-31 11:02:06 +0200
commit1c3bfd949bc7903ee945694a8c807250d0e893ab (patch)
tree461b33d0d7cc316e46ba4cb293bdea58935f13be
parentc02adbb8e1a272196f891e3487e5ce079868cb0d (diff)
downloadslixmpp-1c3bfd949bc7903ee945694a8c807250d0e893ab.tar.gz
slixmpp-1c3bfd949bc7903ee945694a8c807250d0e893ab.tar.bz2
slixmpp-1c3bfd949bc7903ee945694a8c807250d0e893ab.tar.xz
slixmpp-1c3bfd949bc7903ee945694a8c807250d0e893ab.zip
escape: imports at the top
-rw-r--r--sleekxmpp/xmlstream/tostring.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/tostring.py b/sleekxmpp/xmlstream/tostring.py
index 771f8dab..addd6989 100644
--- a/sleekxmpp/xmlstream/tostring.py
+++ b/sleekxmpp/xmlstream/tostring.py
@@ -16,6 +16,7 @@
from __future__ import unicode_literals
import sys
+from xml.etree.ElementTree import _escape_cdata, _raise_serialization_error
if sys.version_info < (3, 0):
import types
@@ -141,7 +142,6 @@ def tostring(xml=None, xmlns='', stream=None, outbuffer='',
def escape(text, use_cdata=False):
encoding = 'utf-8'
- from xml.etree.ElementTree import _escape_cdata, _raise_serialization_error
if use_cdata:
return _escape_cdata(text, encoding)