Skip to content

Commit 7cee276

Browse files
authored
gh-116493: Remove old Python 2.x _winreg imports from platform.py (GH-116494)
1 parent fdb2d90 commit 7cee276

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Lib/platform.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,7 @@ def win32_is_iot():
370370

371371
def win32_edition():
372372
try:
373-
try:
374-
import winreg
375-
except ImportError:
376-
import _winreg as winreg
373+
import winreg
377374
except ImportError:
378375
pass
379376
else:
@@ -432,10 +429,7 @@ def _win32_ver(version, csd, ptype):
432429
csd = 'SP' + csd[13:]
433430

434431
try:
435-
try:
436-
import winreg
437-
except ImportError:
438-
import _winreg as winreg
432+
import winreg
439433
except ImportError:
440434
pass
441435
else:

0 commit comments

Comments
 (0)