Loading django/utils/autoreload.py +3 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,9 @@ def gen_filenames(): Yields a generator over filenames referenced in sys.modules and translation files. """ # N.B. ``list(...)`` is needed, because this runs in parallel with # application code which might be mutating ``sys.modules``, and this will # fail with RuntimeError: cannot mutate dictionary while iterating filenames = [filename.__file__ for filename in list(sys.modules.values()) if hasattr(filename, '__file__')] Loading Loading
django/utils/autoreload.py +3 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,9 @@ def gen_filenames(): Yields a generator over filenames referenced in sys.modules and translation files. """ # N.B. ``list(...)`` is needed, because this runs in parallel with # application code which might be mutating ``sys.modules``, and this will # fail with RuntimeError: cannot mutate dictionary while iterating filenames = [filename.__file__ for filename in list(sys.modules.values()) if hasattr(filename, '__file__')] Loading