mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-05 11:02:14 +01:00
Rplaced generator
This commit is contained in:
parent
6293c135e0
commit
1fe2112fcf
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue