From 1fe2112fcfc518f797118c454994d12898d416a1 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 29 May 2022 16:47:10 +0300 Subject: [PATCH] Rplaced generator --- slpkg/sbo/greps.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/slpkg/sbo/greps.py b/slpkg/sbo/greps.py index 542cc513..94905e80 100644 --- a/slpkg/sbo/greps.py +++ b/slpkg/sbo/greps.py @@ -53,9 +53,13 @@ class SBoGrep(Utils): def _names_grabbing(self): """Generator that collecting all packages names """ - for line in self.SLACKBUILDS_TXT.splitlines(): - if line.startswith(self.line_name): - yield line[17:].strip() + names = self.cur.execute("SELECT name FROM sbo").fetchall() + for n in names: + yield n[0] + +# for line in self.SLACKBUILDS_TXT.splitlines(): +# if line.startswith(self.line_name): +# yield line[17:].strip() def names(self): """Alias method convert generator and return