mirror of https://github.com/python/cpython
gh-116493: Remove old Python 2.x _winreg imports from platform.py (GH-116494)
This commit is contained in:
parent
fdb2d90a27
commit
7cee276d55
|
@ -370,10 +370,7 @@ def win32_is_iot():
|
|||
|
||||
def win32_edition():
|
||||
try:
|
||||
try:
|
||||
import winreg
|
||||
except ImportError:
|
||||
import _winreg as winreg
|
||||
import winreg
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
|
@ -432,10 +429,7 @@ def _win32_ver(version, csd, ptype):
|
|||
csd = 'SP' + csd[13:]
|
||||
|
||||
try:
|
||||
try:
|
||||
import winreg
|
||||
except ImportError:
|
||||
import _winreg as winreg
|
||||
import winreg
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue