Fixing python 3 import of winreg in installer asset.
This commit is contained in:
parent
f84521da7e
commit
beb5c3d0f0
|
@ -6,12 +6,15 @@ import tempfile
|
||||||
import tarfile
|
import tarfile
|
||||||
import shutil
|
import shutil
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
try:
|
try: # py3
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
except ImportError:
|
from winreg import OpenKey, CloseKey, QueryValueEx, SetValueEx, \
|
||||||
from urllib import urlopen
|
|
||||||
from _winreg import OpenKey, CloseKey, QueryValueEx, SetValueEx, \
|
|
||||||
HKEY_CURRENT_USER, KEY_ALL_ACCESS, REG_EXPAND_SZ
|
HKEY_CURRENT_USER, KEY_ALL_ACCESS, REG_EXPAND_SZ
|
||||||
|
except ImportError: # py2
|
||||||
|
from urllib import urlopen
|
||||||
|
from _winreg import OpenKey, CloseKey, QueryValueEx, SetValueEx, \
|
||||||
|
HKEY_CURRENT_USER, KEY_ALL_ACCESS, REG_EXPAND_SZ
|
||||||
|
|
||||||
import ctypes
|
import ctypes
|
||||||
from ctypes.wintypes import HWND, UINT, WPARAM, LPARAM, LPVOID
|
from ctypes.wintypes import HWND, UINT, WPARAM, LPARAM, LPVOID
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue