Support Python 2.7 and Python 3 winreg imports on Windows

This commit is contained in:
Derek Tracy
2021-02-24 20:54:39 -05:00
committed by NoDRM
parent d9353bdd93
commit 1545d76803
10 changed files with 41 additions and 10 deletions

View File

@@ -101,7 +101,10 @@ def getNookLogFiles():
logFiles = []
found = False
if iswindows:
import winreg
try:
import winreg
except ImportError:
import _winreg as winreg
# some 64 bit machines do not have the proper registry key for some reason
# or the python interface to the 32 vs 64 bit registry is broken