empty lists
This commit is contained in:
parent
2a3c09d0ce
commit
40e8eeb0cb
4 changed files with 12 additions and 10 deletions
|
|
@ -1089,7 +1089,10 @@ class Item(models.Model):
|
|||
icons = os.path.abspath(os.path.join(settings.MEDIA_ROOT, icon))
|
||||
icons = glob(icons.replace('.jpg', '*.jpg'))
|
||||
for f in filter(lambda p: not p.endswith('/icon.jpg'), icons):
|
||||
os.unlink(f)
|
||||
try:
|
||||
os.unlink(f)
|
||||
except:
|
||||
pass
|
||||
return icon
|
||||
|
||||
def load_subtitles(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue