diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-08-05 11:06:26 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-08-29 23:08:06 +0200 |
| commit | b18bb65fd2ba0d4f3a0c3a15355c2a9c5afa9969 (patch) | |
| tree | b936c342c30a02631545b32c21b62aeb78e10ac4 /django | |
| parent | 0d368bfb472513e0adb6b1d9d246511f2556e3d7 (diff) | |
[1.8.x] 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.
Backport of 23620cb8e0 from master
Diffstat (limited to 'django')
| -rw-r--r-- | django/utils/autoreload.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index 5cb7fd0bac..807a1f76ba 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -95,7 +95,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( @@ -122,7 +122,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) |
