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

View file

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