mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #34407 -- Reported filename when decoding fails in collectstatic's post_process.
This commit is contained in:
committed by
Mariusz Felisiak
parent
4db33e96d1
commit
03bc92af97
@@ -353,7 +353,10 @@ class HashedFilesMixin:
|
||||
# ..to apply each replacement pattern to the content
|
||||
if name in adjustable_paths:
|
||||
old_hashed_name = hashed_name
|
||||
content = original_file.read().decode("utf-8")
|
||||
try:
|
||||
content = original_file.read().decode("utf-8")
|
||||
except UnicodeDecodeError as exc:
|
||||
yield name, None, exc, False
|
||||
for extension, patterns in self._patterns.items():
|
||||
if matches_patterns(path, (extension,)):
|
||||
for pattern, template in patterns:
|
||||
|
||||
Reference in New Issue
Block a user