summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2015-08-05 11:06:26 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2015-08-29 20:47:38 +0200
commit23620cb8e09aef575c6c5b63cb33f0cda8f5038f (patch)
tree6491e9276fc6ba822244534fb1e2dc3a8a7ab3b2 /django/utils
parentb649f68649b0cba2de9e6bb8cf3d3fe468372c2e (diff)
Accounted for error files in the autoreloader.
* When some old files contain errors, the second call to gen_filenames() should return them. * When some new files contain errors, the first call to gen_filenames(only_new=True) should return them.
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/autoreload.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py
index 6efd6c4f58..ad4b0db6fb 100644
--- a/django/utils/autoreload.py
+++ b/django/utils/autoreload.py
@@ -92,7 +92,7 @@ def gen_filenames(only_new=False):
if only_new:
return []
else:
- return _cached_filenames
+ return _cached_filenames + clean_files(_error_files)
new_modules = module_values - _cached_modules
new_filenames = clean_files(
@@ -119,7 +119,7 @@ def gen_filenames(only_new=False):
_cached_modules = _cached_modules.union(new_modules)
_cached_filenames += new_filenames
if only_new:
- return new_filenames
+ return new_filenames + clean_files(_error_files)
else:
return _cached_filenames + clean_files(_error_files)