Skip to content

Commit 1124f72

Browse files
serdtsekol1claudep
authored andcommitted
Improve error logging for missing remote files in ThumbnailBackend
1 parent fb2a4a6 commit 1124f72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sorl/thumbnail/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ def get_thumbnail(self, file_, geometry_string, **options):
103103
try:
104104
source_image = default.engine.get_image(source)
105105
except Exception as e:
106-
logger.exception(e)
107106
if settings.THUMBNAIL_DUMMY:
108107
return DummyImageFile(geometry_string)
109108
else:
110109
# if storage backend says file doesn't exist remotely,
111110
# don't try to create it and exit early.
112111
# Will return working empty image type; 404'd image
112+
logger.exception(e)
113113
logger.warning(
114114
'Remote file [%s] at [%s] does not exist',
115115
file_, geometry_string,

0 commit comments

Comments
 (0)