From 5af887695652a36e51fd9c7a1af75720afb380c0 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 14 Feb 2020 15:51:28 +0100 Subject: [PATCH] Updated to generator --- slpkg/sbo/check.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/slpkg/sbo/check.py b/slpkg/sbo/check.py index 3f84a33d..3c8d5db6 100644 --- a/slpkg/sbo/check.py +++ b/slpkg/sbo/check.py @@ -37,7 +37,8 @@ from slpkg.sbo.greps import SBoGrep def sbo_upgrade(skip, flag): """Return packages for upgrade """ - Msg().checking() + msg = Msg() + msg.checking() upgrade_names = [] data = SBoGrep(name="").names() blacklist = BlackList().get_black() @@ -49,7 +50,7 @@ def sbo_upgrade(skip, flag): package = f"{name}-{ver}" if parse_version(sbo_package) > parse_version(package): upgrade_names.append(name) - Msg().done() + msg.done() if "--checklist" in flag: upgrade_names = choose_upg(upgrade_names) return upgrade_names @@ -58,8 +59,6 @@ def sbo_upgrade(skip, flag): def sbo_list(): """Return all SBo packages """ - sbo_packages = [] for pkg in os.listdir(_meta_.pkg_path): if pkg.endswith("_SBo"): - sbo_packages.append(pkg) - return sbo_packages + yield pkg \ No newline at end of file