From 1c3bfd949bc7903ee945694a8c807250d0e893ab Mon Sep 17 00:00:00 2001 From: Jean-Philippe Caruana Date: Wed, 31 Jul 2013 10:50:39 +0200 Subject: [PATCH] escape: imports at the top --- sleekxmpp/xmlstream/tostring.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)