From: Marcin Krol Date: Sun, 9 May 2021 10:59:34 +0000 (+0200) Subject: - python3 raises error when dictionary is changed during loop X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=3ce84d461db5383b79d6940a27ce672932c9ac78;p=tld-builder.git - python3 raises error when dictionary is changed during loop --- diff --git a/TLD_Builder/install.py b/TLD_Builder/install.py index 9cfb94f..c8eb543 100644 --- a/TLD_Builder/install.py +++ b/TLD_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