aboutsummaryrefslogtreecommitdiff
path: root/libs/winreg.py
diff options
context:
space:
mode:
Diffstat (limited to 'libs/winreg.py')
-rw-r--r--libs/winreg.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/winreg.py b/libs/winreg.py
new file mode 100644
index 0000000..2ecbb1f
--- /dev/null
+++ b/libs/winreg.py
@@ -0,0 +1,14 @@
+# Linux compatibility shim for Python plugins that import the Windows `winreg`
+# module. Callers in our plugin set expect registry access to fail and fall back
+# to non-registry paths.
+
+HKEY_LOCAL_MACHINE = object()
+HKEY_CURRENT_USER = object()
+
+
+def OpenKey(*_args, **_kwargs):
+ raise FileNotFoundError("winreg is not available on this platform")
+
+
+def QueryValueEx(*_args, **_kwargs):
+ raise FileNotFoundError("winreg is not available on this platform")