summaryrefslogtreecommitdiff
path: root/portato/gui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/gui/windows/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index e00e9e4..29eb728 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -791,13 +791,13 @@ class MainWindow (Window):
if not packages:
raise VersionsNotFoundException(cp)
- best = system.find_best([x.get_cpv() for x in packages]).get_version()
+ best = system.find_best_match(cp)
# append versions
for vers, inst, slot in ((x.get_version(), x.is_installed(), get_slot(x)) for x in packages):
if inst:
icon = self.icons["installed"]
- elif vers == best:
+ elif best is not None and vers == best.get_version():
icon = self.icons["better"]
else:
icon = None