catch IO error
This commit is contained in:
parent
23ab4260ed
commit
1ef514ef4c
1 changed files with 2 additions and 0 deletions
|
@ -89,6 +89,8 @@ class PosterCache(models.Model):
|
|||
if self.image:
|
||||
try:
|
||||
self.image.width
|
||||
except IOError:
|
||||
self.image.delete()
|
||||
except TypeError:
|
||||
self.failed = True
|
||||
self.status = "invalid image"
|
||||
|
|
Loading…
Reference in a new issue