summaryrefslogtreecommitdiffstats
path: root/src/lib/Server
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Server')
-rw-r--r--src/lib/Server/Plugins/Cfg.py1
-rw-r--r--src/lib/Server/Plugins/Snapshots.py1
-rw-r--r--src/lib/Server/Reports/reports/templatetags/syntax_coloring.py1
-rw-r--r--src/lib/Server/Snapshots/model.py1
4 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py
index 4a0fd2dfe..c93b76488 100644
--- a/src/lib/Server/Plugins/Cfg.py
+++ b/src/lib/Server/Plugins/Cfg.py
@@ -24,6 +24,7 @@ except:
logger = logging.getLogger('Bcfg2.Plugins.Cfg')
+# py3k compatibility
def u_str(string, encoding):
if sys.hexversion >= 0x03000000:
return string.encode(encoding)
diff --git a/src/lib/Server/Plugins/Snapshots.py b/src/lib/Server/Plugins/Snapshots.py
index 8b6bad574..aeb3b9f74 100644
--- a/src/lib/Server/Plugins/Snapshots.py
+++ b/src/lib/Server/Plugins/Snapshots.py
@@ -28,6 +28,7 @@ datafields = {
}
+# py3k compatibility
def u_str(string):
if sys.hexversion >= 0x03000000:
return string
diff --git a/src/lib/Server/Reports/reports/templatetags/syntax_coloring.py b/src/lib/Server/Reports/reports/templatetags/syntax_coloring.py
index 291528e2e..2e30125f9 100644
--- a/src/lib/Server/Reports/reports/templatetags/syntax_coloring.py
+++ b/src/lib/Server/Reports/reports/templatetags/syntax_coloring.py
@@ -15,6 +15,7 @@ try:
except:
colorize = False
+# py3k compatibility
def u_str(string):
if sys.hexversion >= 0x03000000:
return string
diff --git a/src/lib/Server/Snapshots/model.py b/src/lib/Server/Snapshots/model.py
index 2aa35f1ec..f30c38a05 100644
--- a/src/lib/Server/Snapshots/model.py
+++ b/src/lib/Server/Snapshots/model.py
@@ -7,6 +7,7 @@ from sqlalchemy.orm import relation, backref
from sqlalchemy.ext.declarative import declarative_base
+# py3k compatibility
def u_str(string):
if sys.hexversion >= 0x03000000:
return string