Rplaced generator

This commit is contained in:
Dimitris Zlatanidis 2022-05-29 16:47:10 +03:00
parent 6293c135e0
commit 1fe2112fcf

View file

@ -53,9 +53,13 @@ class SBoGrep(Utils):
def _names_grabbing(self): def _names_grabbing(self):
"""Generator that collecting all packages names """Generator that collecting all packages names
""" """
for line in self.SLACKBUILDS_TXT.splitlines(): names = self.cur.execute("SELECT name FROM sbo").fetchall()
if line.startswith(self.line_name): for n in names:
yield line[17:].strip() yield n[0]
# for line in self.SLACKBUILDS_TXT.splitlines():
# if line.startswith(self.line_name):
# yield line[17:].strip()
def names(self): def names(self):
"""Alias method convert generator and return """Alias method convert generator and return