diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2014-08-16 22:37:25 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-09-01 02:42:45 +0200 |
commit | 0e950154103ba9385b13f76548befa87509995f3 (patch) | |
tree | 14f38018f0ca25deed5729c7f4c9fd84779e5655 /slixmpp/xmlstream/tostring.py | |
parent | b92dac72f3bb601837dde507597d47715c5ad1aa (diff) | |
download | slixmpp-0e950154103ba9385b13f76548befa87509995f3.tar.gz slixmpp-0e950154103ba9385b13f76548befa87509995f3.tar.bz2 slixmpp-0e950154103ba9385b13f76548befa87509995f3.tar.xz slixmpp-0e950154103ba9385b13f76548befa87509995f3.zip |
Remove sys.version_info checks for python2 and clean some imports.
Diffstat (limited to 'slixmpp/xmlstream/tostring.py')
-rw-r--r-- | slixmpp/xmlstream/tostring.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/slixmpp/xmlstream/tostring.py b/slixmpp/xmlstream/tostring.py index c1e4911a..2d99e323 100644 --- a/slixmpp/xmlstream/tostring.py +++ b/slixmpp/xmlstream/tostring.py @@ -13,14 +13,6 @@ :license: MIT, see LICENSE for more details """ -from __future__ import unicode_literals - -import sys - -if sys.version_info < (3, 0): - import types - - XML_NS = 'http://www.w3.org/XML/1998/namespace' @@ -145,10 +137,6 @@ def escape(text, use_cdata=False): :param string text: The XML text to convert. :rtype: Unicode string """ - if sys.version_info < (3, 0): - if type(text) != types.UnicodeType: - text = unicode(text, 'utf-8', 'ignore') - escapes = {'&': '&', '<': '<', '>': '>', |