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:
|
if self.image:
|
||||||
try:
|
try:
|
||||||
self.image.width
|
self.image.width
|
||||||
|
except IOError:
|
||||||
|
self.image.delete()
|
||||||
except TypeError:
|
except TypeError:
|
||||||
self.failed = True
|
self.failed = True
|
||||||
self.status = "invalid image"
|
self.status = "invalid image"
|
||||||
|
|
Loading…
Reference in a new issue