_winreg in python3 has been changed to winreg. Update imports.

This commit is contained in:
Jeremy Whiting
2020-10-21 10:43:54 -06:00
parent c4c20eb07e
commit 0add3646d9
9 changed files with 11 additions and 12 deletions

View File

@@ -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