Updated return a row

This commit is contained in:
Dimitris Zlatanidis 2022-12-22 17:11:08 +02:00
parent f5ae68d6cc
commit e45bba96cb

View file

@ -22,7 +22,8 @@ class SBoQueries:
def names(self):
""" Returns all the slackbuilds. """
return list(self._names_grabbing())
names = self.session.query(SBoTable.name).all()
return [name[0] for name in names]
def slackbuild(self):
""" Returns a slackbuild. """
@ -117,9 +118,3 @@ class SBoQueries:
if self.configs.os_arch == 'x86_64' and arch64:
return arch64
return arch
def _names_grabbing(self):
""" Generate and returns all the slackbuilds. """
names = self.session.query(SBoTable.name).all()
for n in names:
yield n[0]