dont fail if files are already gone

This commit is contained in:
j 2015-10-04 18:17:34 +01:00
parent e761ee692d
commit 2e3b61d163
1 changed files with 4 additions and 1 deletions

View File

@ -300,7 +300,10 @@ class Edit(models.Model):
folder = os.path.dirname(icon)
ox.makedirs(folder)
for f in glob("%s/icon*.jpg" % folder):
os.unlink(f)
try:
os.unlink(f)
except:
pass
cmd = [
settings.LIST_ICON,
'-f', ','.join(frames),