Changing interface dictionary while iterating over interface.keys() produced "RuntimeError: dictionary changed size during iteration"
pull/37261/head
Selivanov Pavel 7 years ago committed by ansibot
parent 56967497d5
commit b47c04a70e

@ -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…
Cancel
Save