Replaces IOError by OSError (#26428)
This commit is contained in:
parent
4004879ae0
commit
0df1b4c7a1
20 changed files with 24 additions and 24 deletions
|
@ -66,7 +66,7 @@ def _precheck_image(image, opts):
|
|||
raise ValueError()
|
||||
try:
|
||||
img = Image.open(io.BytesIO(image))
|
||||
except IOError:
|
||||
except OSError:
|
||||
_LOGGER.warning("Failed to open image")
|
||||
raise ValueError()
|
||||
imgfmt = str(img.format)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue