mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
Simplify the registry-module-finding code: _winreg or win32api/win32con.
This'll work fine with 2.0 or 1.5.2, but is less than ideal for 1.6a1/a2. But the code to accomodate 1.6a1/a2 was released with Distutils 0.9, so it can go away now.
This commit is contained in:
parent
2658d15d45
commit
1b5ec76190
1 changed files with 1 additions and 4 deletions
|
@ -19,11 +19,8 @@ from distutils.ccompiler import \
|
|||
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…
Add table
Add a link
Reference in a new issue