In Python 3.12, it looks like cdll.ktoblzcheck will raise AttributeError:
Python 3.12.0 (main, Oct 4 2023, 06:27:34) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import cdll; cdll.ktoblzcheck
Traceback (most recent call last):
File "/usr/lib/python3.12/ctypes/__init__.py", line 450, in __getattr__
dll = self._dlltype(name)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/ctypes/__init__.py", line 379, in __init__
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: ktoblzcheck: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.12/ctypes/__init__.py", line 452, in __getattr__
raise AttributeError(name)
AttributeError: ktoblzcheck
Since current code only handles OSError, it will cause Python code to exit rather than fallback to cdll['libktoblzcheck.so.1']
Thank you for reporting this problem. If you already have a solution to the problem, please open a merge request with a patch to fix the problem.