catch IO error

This commit is contained in:
j 2010-09-19 19:32:16 +02:00
parent 23ab4260ed
commit 1ef514ef4c

View file

@ -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"