mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Changing interface dictionary while iterating over interface.keys() produced "RuntimeError: dictionary changed size during iteration"
This commit is contained in:
parent
56967497d5
commit
b47c04a70e
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue