_winreg in python3 has been changed to winreg. Update imports.
This commit is contained in:
@@ -95,7 +95,7 @@ def getNookLogFiles():
|
||||
logFiles = []
|
||||
found = False
|
||||
if iswindows:
|
||||
import _winreg as winreg
|
||||
import 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
|
||||
|
||||
@@ -190,7 +190,6 @@ if iswindows:
|
||||
create_unicode_buffer, create_string_buffer, CFUNCTYPE, addressof, \
|
||||
string_at, Structure, c_void_p, cast
|
||||
|
||||
# import _winreg as winreg
|
||||
import winreg
|
||||
MAX_PATH = 255
|
||||
kernel32 = windll.kernel32
|
||||
|
||||
@@ -20,7 +20,7 @@ class SimplePrefs(object):
|
||||
self.file2key[filename] = key
|
||||
self.target = target + 'Prefs'
|
||||
if sys.platform.startswith('win'):
|
||||
import _winreg as winreg
|
||||
import winreg
|
||||
regkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\")
|
||||
path = winreg.QueryValueEx(regkey, 'Local AppData')[0]
|
||||
prefdir = path + os.sep + self.target
|
||||
|
||||
Reference in New Issue
Block a user