From c79b49d9a9b7c36649328004b4da912da14ef07d Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Thu, 21 May 2009 19:06:29 +0100 Subject: [PATCH] Fixed error if we can't find an icon If no icon was cached, we tried to download it ourselves, but that code was only meant for old versions of 0launch. Bug #2794719 --- AddApp/launcher.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AddApp/launcher.py b/AddApp/launcher.py index 7789227..d9bf1a8 100644 --- a/AddApp/launcher.py +++ b/AddApp/launcher.py @@ -27,6 +27,8 @@ class AppLauncher(saving.Saveable): self.policy.recalculate() iface = iface_cache.get_interface(uri) self.impl = self.policy.implementation[iface] + if not self.impl: + raise Exception("Failed to select an implementation of %s" % iface) if hasattr(self.impl, 'main'): self.main = self.impl.main else: @@ -165,7 +167,9 @@ exec 0launch --main=AppletRun '%s' "$@" path = iface_cache.get_icon_path(iface) if path: self.icon = path - return + return + + # Older versions of 0launch... from zeroinstall.injector import reader, model, basedir, namespaces if self.uri.startswith('/'): -- 2.11.4.GIT