diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py
index 3ac8c1f..27e19a7 100644
a
|
b
|
def inotify_code_changed():
|
198 | 198 | return EventHandler.modified_code |
199 | 199 | |
200 | 200 | |
| 201 | def get_file_modified_type(filename): |
| 202 | return I18N_MODIFIED if filename.endswith('.mo') else FILE_MODIFIED |
| 203 | |
| 204 | |
201 | 205 | def code_changed(): |
202 | 206 | global _mtimes, _win |
203 | 207 | for filename in gen_filenames(): |
204 | | stat = os.stat(filename) |
| 208 | try: |
| 209 | stat = os.stat(filename) |
| 210 | except OSError: |
| 211 | # in case a file is deleted |
| 212 | return get_file_modified_type(filename) |
205 | 213 | mtime = stat.st_mtime |
206 | 214 | if _win: |
207 | 215 | mtime -= stat.st_ctime |
… |
… |
def code_changed():
|
214 | 222 | del _error_files[_error_files.index(filename)] |
215 | 223 | except ValueError: |
216 | 224 | pass |
217 | | return I18N_MODIFIED if filename.endswith('.mo') else FILE_MODIFIED |
| 225 | return get_file_modified_type(filename) |
218 | 226 | return False |
219 | 227 | |
220 | 228 | |