Catch OSError when converting with Pillow
This commit is contained in:
parent
2c7861bc1d
commit
456d7f87ff
|
@ -2399,7 +2399,7 @@ class Interface:
|
||||||
'avatar image using pillow', filename)
|
'avatar image using pillow', filename)
|
||||||
try:
|
try:
|
||||||
avatar = Image.open(path).convert("RGBA")
|
avatar = Image.open(path).convert("RGBA")
|
||||||
except NameError:
|
except (NameError, OSError):
|
||||||
app.log('avatar').warning('Pillow convert failed: %s', filename)
|
app.log('avatar').warning('Pillow convert failed: %s', filename)
|
||||||
app.log('avatar').debug('Error', exc_info=True)
|
app.log('avatar').debug('Error', exc_info=True)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue