mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
py3: DNS: get_record_entry_attrs: do not modify dict during iteration
In py3 keys() doesn't return list but iterator so it must be transformed to tuple otherwise iterator will be broken. https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
parent
a3d3b0ad25
commit
03d0a55e8a
@ -3195,7 +3195,7 @@ class dnsrecord(LDAPObject):
|
||||
|
||||
def get_record_entry_attrs(self, entry_attrs):
|
||||
entry_attrs = entry_attrs.copy()
|
||||
for attr in entry_attrs.keys():
|
||||
for attr in tuple(entry_attrs.keys()):
|
||||
if attr not in self.params or self.params[attr].primary_key:
|
||||
del entry_attrs[attr]
|
||||
return entry_attrs
|
||||
|
Loading…
Reference in New Issue
Block a user