Fix netconf module_utils dict changed size issue (#46778)

Fixes #46755

Use list() to copy the keys of attribute dict
while iterating over attribute dict.
pull/42029/head
Ganesh Nalawade 6 years ago committed by GitHub
parent 32397531d0
commit 58aaf53271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -131,7 +131,7 @@ def sanitize_xml(data):
# remove attributes
attribute = element.attrib
if attribute:
for key in attribute:
for key in list(attribute):
if key not in IGNORE_XML_ATTRIBUTE:
attribute.pop(key)
return to_text(tostring(tree), errors='surrogate_then_replace').strip()

Loading…
Cancel
Save