From 0dadb806b99f6666e22c4c1f6a23dbe614baebdb Mon Sep 17 00:00:00 2001 From: Obijuan Date: Sun, 17 Mar 2024 13:24:36 +0100 Subject: [PATCH] resources.py refactoring --- apio/resources.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apio/resources.py b/apio/resources.py index 818e4f67..32c7eab4 100644 --- a/apio/resources.py +++ b/apio/resources.py @@ -224,11 +224,13 @@ def get_packages(self) -> tuple[list, list]: # -- Check if this package is installed if package in self.profile.packages: - # package_name = self.get_package_release_name(package) + # -- Get the installed version + version = self.profile.packages[package]["version"] - data["version"] = self.profile.get_package_version( - package, self.get_package_release_name(package) - ) + # -- Store the version + data["version"] = version + + # -- Store the package installed_packages += [data] # -- The package is not installed