From: Marcin Krol Date: Sun, 9 May 2021 12:09:37 +0000 (+0200) Subject: - python3 raises error when dictionary is changed during loop X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=129e2f73ba7bf70cc60fa88dbd5fab5cc1820cba;p=projects%2Fpld-builder.new.git - python3 raises error when dictionary is changed during loop --- diff --git a/PLD_Builder/install.py b/PLD_Builder/install.py index 91a115e..bed6c1d 100644 --- a/PLD_Builder/install.py +++ b/PLD_Builder/install.py @@ -23,7 +23,7 @@ def close_killset(killset): return True rx = re.compile(r'^.* marks (?P[^\s]+?)-[^-]+-[^-]+\s.*$') errors = "" - for p in k: + for p in list(k): if p in hold: del killset[p] errors += "cannot remove %s because it's crucial\n" % p