summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2011-11-14 20:29:53 (GMT)
committerJohn (J5) Palmieri <johnp@redhat.com>2011-11-14 20:30:26 (GMT)
commit46cae9a29edc87be7f3015f24928c73e35be6a5b (patch)
treeeef73f84128af926b57a66a61ecd3afa07d0e016
parent63fc981e702fd54b5a5727d504bab47c8da5d3e0 (diff)
downloadfedoracommunity-46cae9a29edc87be7f3015f24928c73e35be6a5b.zip
fedoracommunity-46cae9a29edc87be7f3015f24928c73e35be6a5b.tar.gz
fedoracommunity-46cae9a29edc87be7f3015f24928c73e35be6a5b.tar.xz
do not error out on bad icons
-rw-r--r--fedoracommunity/search/iconcache.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/fedoracommunity/search/iconcache.py b/fedoracommunity/search/iconcache.py
index 44f484d..17518bc 100644
--- a/fedoracommunity/search/iconcache.py
+++ b/fedoracommunity/search/iconcache.py
@@ -24,7 +24,11 @@ class IconCache(object):
best_match = None
for icon_path in icon_path_list:
- pixbuf = GdkPixbuf.Pixbuf.new_from_file(icon_path)
+ try:
+ pixbuf = GdkPixbuf.Pixbuf.new_from_file(icon_path)
+ except Exception:
+ continue
+
width = pixbuf.get_width()