try/except remove poster

This commit is contained in:
j 2011-10-25 10:51:30 +02:00
parent af340843d8
commit d023219359

View file

@ -893,9 +893,9 @@ class Item(models.Model):
def delete_poster(self):
if self.poster:
path = self.poster.path
if os.path.exists(path):
try:
self.poster.delete()
else:
except:
self.poster.name = None
else:
poster= self.path('poster.jpg')