2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-23 01:53:28 +00:00

Fix modifying dictionary while iterating

Need to make a stable value before iterating to delete.
This commit is contained in:
Jarrod Johnson 2019-01-31 14:28:45 -05:00
parent 188feec0b4
commit f4cf74b699

View File

@ -342,7 +342,7 @@ def _full_updatemacmap(configmanager):
_switchportmap[curswitch][portname] = None
else:
_switchportmap[curswitch][portname] = node
for switch in _macsbyswitch:
for switch in list(_macsbyswitch):
if switch not in switches:
del _macsbyswitch[switch]
switchauth = get_switchcreds(configmanager, switches)