From 0e950154103ba9385b13f76548befa87509995f3 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 16 Aug 2014 22:37:25 +0200 Subject: Remove sys.version_info checks for python2 and clean some imports. --- slixmpp/xmlstream/tostring.py | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'slixmpp/xmlstream/tostring.py') 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 = {'&': '&', '<': '<', '>': '>', -- cgit v1.2.3