summaryrefslogtreecommitdiff
path: root/source4/heimdal
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal')
-rw-r--r--source4/heimdal/lib/wind/generate.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/heimdal/lib/wind/generate.py b/source4/heimdal/lib/wind/generate.py
index 1d708c6a3c4..91dc151ce87 100644
--- a/source4/heimdal/lib/wind/generate.py
+++ b/source4/heimdal/lib/wind/generate.py
@@ -37,6 +37,7 @@
import datetime
import string
import os
+import sys
class GeneratedFile :
"Represents a generated file"
@@ -56,7 +57,11 @@ class GeneratedFile :
class Header(GeneratedFile) :
"Represents a generated header file"
- guardTrans = string.maketrans('-.', '__')
+ if sys.hexversion>0x300000f:
+ guardTrans = bytes.maketrans(b'-.', b'__')
+ else:
+ import string
+ guardTrans = string.maketrans('-.', '__')
def makeGuard(self) :
"""Return a name to be used as ifdef guard"""
return string.upper(string.translate(self.name, self.guardTrans))