Skip to content

Commit b5fbfc0

Browse files
committed
Use winreg.KEY_WOW64_64KEY
1 parent fa02440 commit b5fbfc0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/test/pythoninfo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,8 @@ def winreg_query(path):
923923
raise ValueError(f"unknown key {key!r}")
924924

925925
try:
926-
with winreg.OpenKey(key, sub_key) as key_handle:
926+
access = winreg.KEY_READ | winreg.KEY_WOW64_64KEY
927+
with winreg.OpenKey(key, sub_key, access=access) as key_handle:
927928
result, _ = winreg.QueryValueEx(key_handle, value)
928929
return result
929930
except OSError:

0 commit comments

Comments
 (0)