Skip to content

Commit 50ddc26

Browse files
[lldb][test][Shell] Remove Python 2 compatibility in build.py (llvm#163192)
_winreg was renamed to winreg in 3.0, and we require >= 3.8. https://docs.python.org/3/whatsnew/3.0.html#library-changes
1 parent 38a5282 commit 50ddc26

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lldb/test/Shell/helper/build.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@
99
import sys
1010

1111
if sys.platform == "win32":
12-
# This module was renamed in Python 3. Make sure to import it using a
13-
# consistent name regardless of python version.
14-
try:
15-
import winreg
16-
except:
17-
import _winreg as winreg
12+
import winreg
13+
1814

1915
if __name__ != "__main__":
2016
raise RuntimeError("Do not import this script, run it instead")

0 commit comments

Comments
 (0)