gh-116493: Remove old Python 2.x _winreg imports from platform.py (GH-116494)

This commit is contained in:
Nikita Sobolev 2024-03-08 15:42:21 +03:00 committed by GitHub
parent fdb2d90a27
commit 7cee276d55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 8 deletions

View File

@ -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: