summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2013-06-16 10:04:37 -0500
committerSol Jerome <sol.jerome@gmail.com>2013-06-16 10:04:37 -0500
commitef261545acbcc9ab0872383c5b66efaf53bdd329 (patch)
tree3c469c9b2efb63bcf0f5638450d7d7461b353beb /src/lib
parentabd9d823bd46f13ff8553dddb9eabb31cbf0b2e0 (diff)
downloadbcfg2-ef261545acbcc9ab0872383c5b66efaf53bdd329.tar.gz
bcfg2-ef261545acbcc9ab0872383c5b66efaf53bdd329.tar.bz2
bcfg2-ef261545acbcc9ab0872383c5b66efaf53bdd329.zip
Compat: Fix u_str for PY3K
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Bcfg2/Compat.py5
1 files changed, 1 insertions, 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)