summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/Bcfg2/Bcfg2Py3k.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Bcfg2Py3k.py b/src/lib/Bcfg2/Bcfg2Py3k.py
index 2c179a5ef..13311f28f 100644
--- a/src/lib/Bcfg2/Bcfg2Py3k.py
+++ b/src/lib/Bcfg2/Bcfg2Py3k.py
@@ -64,6 +64,12 @@ try:
except ImportError:
import http.client as httplib
+# py3k compatibility
+if sys.hexversion >= 0x03000000:
+ unicode = str
+else:
+ unicode = unicode
+
# print to file compatibility
def u_str(string, encoding=None):
if sys.hexversion >= 0x03000000: