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.
This commit is contained in:
Ghostkeeper 2017-06-29 15:09:50 +02:00
parent 8ae49c317c
commit 034686e9fa
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -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: