mirror of
https://github.com/django/django.git
synced 2025-11-13 17:09:28 +00:00
Fixed #24441 -- Changed get_image_dimensions() return value for broken images
This commit is contained in:
parent
cb506aed2a
commit
cda74c7fc9
3 changed files with 18 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ def get_image_dimensions(file_or_path, close=False):
|
|||
if p.image:
|
||||
return p.image.size
|
||||
chunk_size *= 2
|
||||
return None
|
||||
return (None, None)
|
||||
finally:
|
||||
if close:
|
||||
file.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue