Skip to content

Commit

Permalink
Avoid iteration error when getting module path (#8533)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbourbeau authored Feb 26, 2024
1 parent df5df00 commit cbf939c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distributed/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def _getmodulename_with_path(fname: str) -> str:
except KeyError:
pass

for modname, mod in sys.modules.items():
for modname, mod in sys.modules.copy().items():
fname2 = getattr(mod, "__file__", None)
if fname2:
_getmodulename_with_path_map[fname2] = modname
Expand Down

0 comments on commit cbf939c

Please sign in to comment.