From 16da4eec5a79b773a022a31a740813a835ed4449 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 20 Jan 2023 18:12:29 +0200 Subject: [PATCH] Fixed upgrade --- slpkg/upgrade.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/slpkg/upgrade.py b/slpkg/upgrade.py index 929d8fa5..737dd2c1 100644 --- a/slpkg/upgrade.py +++ b/slpkg/upgrade.py @@ -7,11 +7,11 @@ from slpkg.blacklist import Blacklist from slpkg.dependencies import Requires -class Upgrade(Utilities): +class Upgrade: """ Upgrade the installed packages. """ def __init__(self): - super(Utilities, self).__init__() + self.utils = Utilities() def packages(self): """ Compares version of packages and returns the maximum. """ @@ -19,14 +19,14 @@ class Upgrade(Utilities): black = Blacklist().get() upgrade, requires = [], [] - installed = self.all_installed() + installed = self.utils.all_installed() for pkg in installed: - inst_pkg_name = self.split_installed_pkg(pkg)[0] + inst_pkg_name = self.utils.split_installed_pkg(pkg)[0] if inst_pkg_name not in black and inst_pkg_name in repo_packages: - if self.is_repo_version_bigger(inst_pkg_name): + if self.utils.is_repo_version_bigger(inst_pkg_name): requires += Requires(inst_pkg_name).resolve() upgrade.append(inst_pkg_name)