summaryrefslogtreecommitdiff
path: root/editor/SCsub
diff options
context:
space:
mode:
authorMatthias Hoelzl <tc@xantira.com>2017-10-04 23:21:32 +0200
committerMatthias Hoelzl <tc@xantira.com>2017-10-04 23:21:32 +0200
commit727a381fc902cd93d23b3624359bad38d49539d0 (patch)
tree9b47cff0bf3b3efc50849ba859d831f428de5d2f /editor/SCsub
parent2e6f2ed0325c65c2b623532bb3b7e191064fe937 (diff)
Fix Python 3 build
- Take care of the differences in handling unicode characters in `escape_string` (formerly in `editor/SCsub`, now in `compat.py)`. - Conditionally include `_winreg` or `winreg` in the Mono editor module.
Diffstat (limited to 'editor/SCsub')
-rw-r--r--editor/SCsub14
1 files changed, 2 insertions, 12 deletions
diff --git a/editor/SCsub b/editor/SCsub
index 11cdb471a8..e44b4e4bb2 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -4,18 +4,8 @@ Import('env')
env.editor_sources = []
import os
-from compat import encode_utf8, byte_to_str, open_utf8
-
-def escape_string(s, encoding='ascii'):
- if isinstance(s, unicode):
- s = s.encode(encoding)
- result = ''
- for c in s:
- if not (32 <= ord(c) < 127) or c in ('\\', '"'):
- result += '\\%03o' % ord(c)
- else:
- result += c
- return result
+from compat import encode_utf8, byte_to_str, open_utf8, escape_string
+
def make_certs_header(target, source, env):