mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-09 02:41:06 +03:00
Avoid more possible crashes when invalid icons are present
This commit is contained in:
parent
83c3a8b68e
commit
f277ba6b33
1 changed files with 6 additions and 1 deletions
|
@ -532,7 +532,12 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
||||||
get_icon_dir(repodir, last_density), iconfilename)
|
get_icon_dir(repodir, last_density), iconfilename)
|
||||||
iconpath = os.path.join(
|
iconpath = os.path.join(
|
||||||
get_icon_dir(repodir, density), iconfilename)
|
get_icon_dir(repodir, density), iconfilename)
|
||||||
im = Image.open(last_iconpath)
|
try:
|
||||||
|
im = Image.open(last_iconpath)
|
||||||
|
except:
|
||||||
|
print "WARNING: Invalid image file at %s" % last_iconpath
|
||||||
|
continue
|
||||||
|
|
||||||
size = dpi_to_px(density)
|
size = dpi_to_px(density)
|
||||||
|
|
||||||
im.thumbnail((size, size), Image.ANTIALIAS)
|
im.thumbnail((size, size), Image.ANTIALIAS)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue