python: fixed warning when uhd.dll was not found

This fixes the silently fail of import uhd when
UHD_LIBRARY_PATH, UHD_PKG_PATH was not set and
UHD_INSTALL_PATH points to an invalid directory
This commit is contained in:
Clemens Felber 2025-08-21 14:27:02 +02:00 committed by Jörg Hofrichter
parent e82dcd6518
commit 5ad0d3c353

View File

@ -48,7 +48,7 @@ if os.name == "nt":
"the UHD binary installation and the UHD Python module to the exact same version "
"by upgrading the older component."
)
else:
if not uhd_dll_dir:
print(
f"WARNING: Failed to add {uhd_dll_name} path to DLL search, module may not import properly, "
"version check skipped.\nPlease ensure UHD_PKG_DIR (binary installation) is set correctly. "