Fix possibly unsafe modification of list during iteration inside
authorZac Medico <zmedico@gentoo.org>
Mon, 7 Dec 2009 02:00:47 +0000 (02:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 7 Dec 2009 02:00:47 +0000 (02:00 -0000)
update_config_files(). (trunk r14951)

svn path=/main/branches/2.1.7/; revision=14952

pym/portage/update.py

index af0fd2f42cee4bb5b59a50b7b4d2098a7b2c8fd0..3df7b08f3ac3af8eb0869376f676e2afe13dce29 100644 (file)
@@ -206,7 +206,7 @@ def update_config_files(config_root, protect, protect_mask, update_iter):
                                                encoding=_encodings['fs'], errors='strict')
                                except UnicodeDecodeError:
                                        continue
-                               for y_enc in dirs:
+                               for y_enc in list(dirs):
                                        try:
                                                y = _unicode_decode(y_enc,
                                                        encoding=_encodings['fs'], errors='strict')