From 8f4a9802ed9461392efcb004d2a71651f81ce84a Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 26 Mar 2023 11:20:58 +0300 Subject: [PATCH] Fixed for installed --- slpkg/utilities.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/slpkg/utilities.py b/slpkg/utilities.py index d41eabb1..a372a53b 100644 --- a/slpkg/utilities.py +++ b/slpkg/utilities.py @@ -36,9 +36,11 @@ class Utilities: def is_package_installed(self, name: str) -> str: """ Returns the installed package name. """ - for package_name in self.installed_package_names: - if package_name == name: - return name + for package in self.installed_packages: + pkg_name: str = self.split_binary_pkg(package)[0] + + if pkg_name == name: + return package return ''