Fixed #18986 -- Improved error message for missing files

in CachedStaticFilesStorage. Thanks zyegfryed for his work on the patch.
This commit is contained in:
Aymeric Augustin 2013-04-28 16:45:05 +02:00
parent f7f69cf7dd
commit 90fe9141de
4 changed files with 27 additions and 2 deletions

View file

@ -251,7 +251,10 @@ class CachedFilesMixin(object):
for patterns in self._patterns.values():
for pattern, template in patterns:
converter = self.url_converter(name, template)
content = pattern.sub(converter, content)
try:
content = pattern.sub(converter, content)
except ValueError as exc:
yield name, None, exc
if hashed_file_exists:
self.delete(hashed_name)
# then save the processed result