From 7907f90cdb20d590841c4f12157b9dea47450544 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 25 Dec 2022 12:26:13 +0200 Subject: [PATCH] Remove for loop --- slpkg/upgrade.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/slpkg/upgrade.py b/slpkg/upgrade.py index be1ce3c4..964e4366 100644 --- a/slpkg/upgrade.py +++ b/slpkg/upgrade.py @@ -43,12 +43,9 @@ class Upgrade: repo_ver = SBoQueries(inst_pkg_name).version() if LooseVersion(repo_ver) > LooseVersion(installed_ver): + requires += Requires(inst_pkg_name).resolve() upgrade.append(inst_pkg_name) - # Creating a list with requires - for pkg in upgrade: - requires += Requires(pkg).resolve() - # Clean the packages if they are dependencies for pkg in upgrade: if pkg not in requires: