From 8b19791f37c56da57d3c901afc71d258bc84260d Mon Sep 17 00:00:00 2001 From: André Apitzsch Date: Wed, 8 Dec 2021 17:17:55 +0100 Subject: python: Fix RuntimeError: dictionary changed size during iteration Iterate over copy and delete from original dictionary. --- host/python/uhd/imgbuilder/image_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 host/python/uhd/imgbuilder/image_builder.py (limited to 'host') diff --git a/host/python/uhd/imgbuilder/image_builder.py b/host/python/uhd/imgbuilder/image_builder.py old mode 100755 new mode 100644 index 81156600e..059d40599 --- a/host/python/uhd/imgbuilder/image_builder.py +++ b/host/python/uhd/imgbuilder/image_builder.py @@ -235,7 +235,7 @@ class ImageBuilderConfig: setattr(desc, "parameters", {}) if "parameters" not in block: block["parameters"] = OrderedDict() - for key in block["parameters"].keys(): + for key in list(block["parameters"].keys()): if key not in desc.parameters: logging.error("Unknown parameter %s for block %s", key, name) del block["parameters"][key] -- cgit v1.2.3