Merge "Avoid RuntimeError caused by iteration over sys.modules"

This commit is contained in:
Zuul
2023-11-13 19:06:55 +00:00
committed by Gerrit Code Review

View File

@@ -56,7 +56,7 @@ CLSNAME_ALIASES = {
('os_ken.lib.packet.ospf', 'StringifyMixin'): ''
}
for modname, moddef in sys.modules.items():
for modname, moddef in sys.modules.copy().items():
if not modname.startswith(PKT_LIB_PATH) or not moddef:
continue
for (clsname, clsdef, ) in inspect.getmembers(moddef):