mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
Changing interface dictionary while iterating over interface.keys() produced "RuntimeError: dictionary changed size during iteration"
This commit is contained in:
@@ -789,7 +789,7 @@ def main():
|
||||
if not force or not interfaces:
|
||||
for interface in copy.deepcopy(exist_interfaces):
|
||||
# remove values not used during hostinterface.add/update calls
|
||||
for key in interface.keys():
|
||||
for key in tuple(interface.keys()):
|
||||
if key in ['interfaceid', 'hostid', 'bulk']:
|
||||
interface.pop(key, None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user