From ef261545acbcc9ab0872383c5b66efaf53bdd329 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Sun, 16 Jun 2013 10:04:37 -0500 Subject: Compat: Fix u_str for PY3K Signed-off-by: Sol Jerome --- src/lib/Bcfg2/Compat.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/Bcfg2/Compat.py b/src/lib/Bcfg2/Compat.py index d034c0777..049236e03 100644 --- a/src/lib/Bcfg2/Compat.py +++ b/src/lib/Bcfg2/Compat.py @@ -79,10 +79,7 @@ except NameError: def u_str(string, encoding=None): """ print to file compatibility """ if sys.hexversion >= 0x03000000: - if encoding is not None: - return string.encode(encoding) - else: - return string + return string else: if encoding is not None: return unicode(string, encoding) -- cgit v1.2.3-1-g7c22