aboutsummaryrefslogtreecommitdiffstats
path: root/host/python
diff options
context:
space:
mode:
authorAndré Apitzsch <andre.apitzsch@etit.tu-chemnitz.de>2021-12-08 17:17:55 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2022-02-24 13:33:22 -0600
commit8b19791f37c56da57d3c901afc71d258bc84260d (patch)
tree332d7c489c94dfa430eb8ba8868128163c60871a /host/python
parentf644c50114a8bf990d39be377d7fbce899af5923 (diff)
downloaduhd-8b19791f37c56da57d3c901afc71d258bc84260d.tar.gz
uhd-8b19791f37c56da57d3c901afc71d258bc84260d.tar.bz2
uhd-8b19791f37c56da57d3c901afc71d258bc84260d.zip
python: Fix RuntimeError: dictionary changed size during iteration
Iterate over copy and delete from original dictionary.
Diffstat (limited to 'host/python')
-rw-r--r--[-rwxr-xr-x]host/python/uhd/imgbuilder/image_builder.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/python/uhd/imgbuilder/image_builder.py b/host/python/uhd/imgbuilder/image_builder.py
index 81156600e..059d40599 100755..100644
--- 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]