mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-13 12:21:12 +00:00
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.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user