Browse Source

Don't modify list you're iterating over

It doesn't give a problem right now since we're only iterating over lists of length 1 here, but in the future this could cause weird bugs.

Contributes to issue CURA-2822.
Ghostkeeper 7 years ago
parent
commit
034686e9fa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cura/Settings/ContainerManager.py

+ 1 - 1
cura/Settings/ContainerManager.py

@@ -224,7 +224,7 @@ class ContainerManager(QObject):
             root = container.getMetaDataEntry(root_name)
 
             item = root
-            for entry in entries:
+            for _ in range(len(entries)):
                 item = item.get(entries.pop(0), { })
 
             if item[entry_name] != entry_value: