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