summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/utils/autoreload.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py
index 3ac8c1fa8e..e7df8c8938 100644
--- a/django/utils/autoreload.py
+++ b/django/utils/autoreload.py
@@ -91,6 +91,7 @@ def gen_filenames(only_new=False):
# fail with RuntimeError: cannot mutate dictionary while iterating
global _cached_modules, _cached_filenames
module_values = set(sys.modules.values())
+ _cached_filenames = clean_files(_cached_filenames)
if _cached_modules == module_values:
# No changes in module list, short-circuit the function
if only_new: