_winreg in python3 has been changed to winreg. Update imports.
This commit is contained in:
@@ -129,7 +129,7 @@ if iswindows:
|
||||
c_long, c_ulong
|
||||
|
||||
from ctypes.wintypes import LPVOID, DWORD, BOOL
|
||||
import _winreg as winreg
|
||||
import winreg
|
||||
|
||||
def _load_crypto_libcrypto():
|
||||
from ctypes.util import find_library
|
||||
|
||||
@@ -98,7 +98,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
|
||||
|
||||
@@ -177,7 +177,7 @@ 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
|
||||
advapi32 = windll.advapi32
|
||||
|
||||
@@ -346,7 +346,7 @@ class KoboLibrary(object):
|
||||
if (self.kobodir == u""):
|
||||
# step 4. we haven't found a device with serials, so try desktop apps
|
||||
if sys.platform.startswith('win'):
|
||||
import _winreg as winreg
|
||||
import winreg
|
||||
if sys.getwindowsversion().major > 5:
|
||||
if 'LOCALAPPDATA' in os.environ.keys():
|
||||
# Python 2.x does not return unicode env. Use Python 3.x
|
||||
|
||||
@@ -2290,7 +2290,7 @@ class PDFDocument(object):
|
||||
import win32api
|
||||
import win32security
|
||||
import win32file
|
||||
import _winreg as winreg
|
||||
import winreg
|
||||
except:
|
||||
raise ADEPTError('PyWin Extension (Win32API module) needed.\n'+\
|
||||
'Download from http://sourceforge.net/projects/pywin32/files/ ')
|
||||
|
||||
Reference in New Issue
Block a user