blob: 2644088a6258cf3b8188ba4cb488b9d05e129522 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Linux compatibility shim for Python plugins that import winreg.
# These plugins already handle FileNotFoundError fallback paths when registry
# lookups are unavailable.
HKEY_LOCAL_MACHINE = object()
HKEY_CURRENT_USER = object()
def OpenKey(*_args, **_kwargs):
raise FileNotFoundError("winreg is not available on this platform")
OpenKeyEx = OpenKey
def QueryValueEx(*_args, **_kwargs):
raise FileNotFoundError("winreg is not available on this platform")
def QueryInfoKey(*_args, **_kwargs):
raise FileNotFoundError("winreg is not available on this platform")
def EnumKey(*_args, **_kwargs):
raise FileNotFoundError("winreg is not available on this platform")
|