[py3] Force evaluation of dict's items() before modifying the dict
authorDenis Laxalde <denis.laxalde@logilab.fr>
Wed, 02 Oct 2019 14:25:12 +0200
changeset 3041 e7bc12390c5d
parent 3040 12ef95c411d0
child 3042 1dd2faa2de16
[py3] Force evaluation of dict's items() before modifying the dict
cubicweb_seda/entities/profile_generation.py
--- a/cubicweb_seda/entities/profile_generation.py	Wed Oct 02 14:21:25 2019 +0200
+++ b/cubicweb_seda/entities/profile_generation.py	Wed Oct 02 14:25:12 2019 +0200
@@ -306,7 +306,7 @@
         attributes = attributes or {}
         tag = self.qname(tag)
         documentation = attributes.pop('documentation', None)
-        for attr, value in attributes.items():
+        for attr, value in list(attributes.items()):
             newattr = substitute_xml_prefix(attr, self.namespaces)
             attributes[newattr] = value
             if newattr != attr: