[projects/pld-builder.new] - python3 raises error when dictionary is changed during loop

hawk hawk at pld-linux.org
Sun May 9 14:09:49 CEST 2021


commit 129e2f73ba7bf70cc60fa88dbd5fab5cc1820cba
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Sun May 9 14:09:37 2021 +0200

    - python3 raises error when dictionary is changed during loop

 PLD_Builder/install.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
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<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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-builder.new.git/commitdiff/129e2f73ba7bf70cc60fa88dbd5fab5cc1820cba



More information about the pld-cvs-commit mailing list