From e6a51a0bc3f87e284de74cec838d3ee98c2f9cf5 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Mon, 26 Oct 2015 19:40:29 +0100 Subject: Use compat module for single Python 2/3 code base. This change includes minor fixes and code cleanup too. --- sqlparse/compat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sqlparse/compat.py') diff --git a/sqlparse/compat.py b/sqlparse/compat.py index 9efae26..6b26384 100644 --- a/sqlparse/compat.py +++ b/sqlparse/compat.py @@ -19,7 +19,7 @@ if PY3: from io import StringIO def u(s): - return s + return str(s) elif PY2: text_type = unicode @@ -27,7 +27,7 @@ elif PY2: from StringIO import StringIO # flake8: noqa def u(s): - return unicode(s, 'unicode_escape') + return unicode(s) # Directly copied from six: -- cgit v1.2.1