escape: imports at the top
This commit is contained in:
parent
c02adbb8e1
commit
1c3bfd949b
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue