mirror of https://github.com/python/cpython.git
On second thought, first try for _winreg, and then winreg. Only if both
fail do we try for win32api/win32con. If *those* both fail, then we don't have registry access. Phew!
This commit is contained in:
parent
cc7371c437
commit
83c3870e2b
|
@ -19,8 +19,12 @@
|
|||
CCompiler, gen_preprocess_options, gen_lib_options
|
||||
|
||||
_can_read_reg = 0
|
||||
try:
|
||||
try:
|
||||
import _winreg
|
||||
except ImportError:
|
||||
import winreg # for pre-2000/06/29 CVS Python
|
||||
|
||||
_can_read_reg = 1
|
||||
hkey_mod = _winreg
|
||||
|
||||
|
|
Loading…
Reference in New Issue