From 0cf40c32761c80aaee77fb6e1f0b12a3a146b655 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 5 Oct 2026 14:56:31 +0200 Subject: [PATCH] rfnoc_image_builder: Fix .grc builds for empty params Some blocks (e.g., the fosphor block) don't have parameters in their respective YAMLs, but the GRC file importer makes the assumption that there are always parameters, and will crash on a faulty dictionary lookup when that's not the case. This conditionally checks parameters, making the lack of parameters non-fatal. --- host/python/uhd/rfnoc_utils/grc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/python/uhd/rfnoc_utils/grc.py b/host/python/uhd/rfnoc_utils/grc.py index d3fe4b38f..d1ba969cf 100644 --- a/host/python/uhd/rfnoc_utils/grc.py +++ b/host/python/uhd/rfnoc_utils/grc.py @@ -67,7 +67,7 @@ def sanitize_connection(connection, known_modules, device, grc_block_dict): for k, v in block_info.get("data", {}).get(in_out, {}).items(): if ( port_name.startswith(k) - and (v.get("num_ports") in block_info["parameters"]) + and (v.get("num_ports") in block_info.get("parameters", {})) and port_name.endswith("_") ): return [block_name, port_name + "0"]