From c6776e447a4bbef57abe35421b8e85242c4e9deb Mon Sep 17 00:00:00 2001 From: Dimitry Ishenko Date: Wed, 2 Oct 2024 13:53:19 -0400 Subject: [PATCH] [python] Fix hooks.py detection --- src/scripting/python/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting/python/core.c b/src/scripting/python/core.c index 4c4c13752..63a3e9bd4 100644 --- a/src/scripting/python/core.c +++ b/src/scripting/python/core.c @@ -143,7 +143,7 @@ hooks_module_exists(void) result = PyObject_CallMethod(imp_module, "find_spec", "s", "hooks"); if (result) { - found_hooks = 1; + found_hooks = (result != Py_None); goto end; } else if (PyErr_ExceptionMatches(PyExc_ImportError)) { PyErr_Clear();