]> TLD Linux GIT Repositories - tld-builder.git/commitdiff
- python3 raises error when dictionary is changed during loop
authorMarcin Krol <hawk@tld-linux.org>
Sun, 9 May 2021 10:59:34 +0000 (12:59 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Sun, 9 May 2021 10:59:34 +0000 (12:59 +0200)
TLD_Builder/install.py

index 9cfb94fa30e3b86ce1c9f901e4447630168c34ff..c8eb5438075383f7b53555882222a353c4078680 100644 (file)
@@ -23,7 +23,7 @@ def close_killset(killset):
         return True
     rx = re.compile(r'^.* marks (?P<name>[^\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