chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83c3a8b
)
Avoid more possible crashes when invalid icons are present
author
Daniel Martí
<mvdan@mvdan.cc>
Fri, 24 Jan 2014 11:55:43 +0000
(12:55 +0100)
committer
Daniel Martí
<mvdan@mvdan.cc>
Fri, 24 Jan 2014 11:55:43 +0000
(12:55 +0100)
fdroidserver/update.py
patch
|
blob
|
history
diff --git
a/fdroidserver/update.py
b/fdroidserver/update.py
index b71d97827034d66530b7dc6c131332cb288fc31b..bf3eed32c4da8f65a3dcc6bf1cc1e85fbe0043d0 100644
(file)
--- a/
fdroidserver/update.py
+++ b/
fdroidserver/update.py
@@
-532,7
+532,12
@@
def scan_apks(apps, apkcache, repodir, knownapks):
get_icon_dir(repodir, last_density), iconfilename)
iconpath = os.path.join(
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)
im.thumbnail((size, size), Image.ANTIALIAS)