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):
"""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