Fixed #33580 -- Fixed crash when checking support for terminal colors on Wine.

Regression in f1585c54d0.
This commit is contained in:
jochemfranken 2022-03-16 16:16:10 +01:00 committed by GitHub
parent 1ea7e3157d
commit 5f9ad17201
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -35,8 +35,8 @@ def supports_color():
except ImportError:
return False
else:
reg_key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, "Console")
try:
reg_key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, "Console")
reg_key_value, _ = winreg.QueryValueEx(reg_key, "VirtualTerminalLevel")
except FileNotFoundError:
return False