diff options
author | Matthias Hoelzl <tc@xantira.com> | 2017-10-04 23:21:32 +0200 |
---|---|---|
committer | Matthias Hoelzl <tc@xantira.com> | 2017-10-04 23:21:32 +0200 |
commit | 727a381fc902cd93d23b3624359bad38d49539d0 (patch) | |
tree | 9b47cff0bf3b3efc50849ba859d831f428de5d2f /modules/mono/mono_reg_utils.py | |
parent | 2e6f2ed0325c65c2b623532bb3b7e191064fe937 (diff) | |
download | redot-engine-727a381fc902cd93d23b3624359bad38d49539d0.tar.gz |
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 'modules/mono/mono_reg_utils.py')
-rw-r--r-- | modules/mono/mono_reg_utils.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/mono/mono_reg_utils.py b/modules/mono/mono_reg_utils.py index 6f1620ff49..e9988625f5 100644 --- a/modules/mono/mono_reg_utils.py +++ b/modules/mono/mono_reg_utils.py @@ -1,7 +1,11 @@ import os if os.name == 'nt': - import _winreg as winreg + import sys + if sys.version_info < (3,): + import _winreg as winreg + else: + import winreg def _reg_open_key(key, subkey): |