Refactor list

This commit is contained in:
Dimitris Zlatanidis 2022-12-31 23:10:52 +02:00
parent 289e4beb4b
commit 6818ede72b

View file

@ -19,14 +19,14 @@ class Check:
@staticmethod @staticmethod
def exists(slackbuilds: list): def exists(slackbuilds: list):
""" Checking if the slackbuild exists in the repository. """ """ Checking if the slackbuild exists in the repository. """
packages = [] not_packages = []
for sbo in slackbuilds: for sbo in slackbuilds:
if not SBoQueries(sbo).slackbuild(): if not SBoQueries(sbo).slackbuild():
packages.append(sbo) not_packages.append(sbo)
if packages: if not_packages:
raise SystemExit(f'\nPackages \'{", ".join(packages)}\' ' raise SystemExit(f'\nPackages \'{", ".join(not_packages)}\' '
'does not exists.\n') 'does not exists.\n')
@staticmethod @staticmethod