Fix #1033 (py3: When changing a dict, iterate over a copy of its items)

This commit is contained in:
Kovid Goyal 2019-08-21 19:47:11 +05:30
parent efd5eefa0f
commit ae35cdd814
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -702,7 +702,7 @@ class Metadata(object):
term = CALIBRE(local)
self.term = term
self.value = value
for attr, value in attrib.items():
for attr, value in tuple(iteritems(attrib)):
if isprefixname(value):
attrib[attr] = qname(value, nsmap)
nsattr = Metadata.OPF_ATTRS.get(attr, attr)