mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
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.
This commit is contained in:
parent
8ad3b4961d
commit
0cf40c3276
@ -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"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user