From 14296e7f3ad907875d546e4116f17afe19778217 Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Mon, 25 Dec 2017 19:08:24 +0000 Subject: [PATCH] buildPy2exe: use proper python2 name for winreg --- buildPy2exe.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/buildPy2exe.py b/buildPy2exe.py index 6d8f730..db4dbaa 100755 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -33,11 +33,8 @@ if missingStrings is not None and missingStrings is not "": def get_nsis_path(): bin_name = "makensis.exe" - try: - from winreg import HKEY_LOCAL_MACHINE as HKLM - from winreg import KEY_READ, KEY_WOW64_32KEY, OpenKey, QueryValueEx - except ImportError: - return bin_name + from _winreg import HKEY_LOCAL_MACHINE as HKLM + from _winreg import KEY_READ, KEY_WOW64_32KEY, OpenKey, QueryValueEx try: nsisreg = OpenKey(HKLM, "Software\\NSIS", 0, KEY_READ | KEY_WOW64_32KEY)