diff --git a/slpkg/blacklist.py b/slpkg/blacklist.py index 42c118b0..c49a2942 100644 --- a/slpkg/blacklist.py +++ b/slpkg/blacklist.py @@ -5,7 +5,6 @@ import tomli from pathlib import Path from slpkg.configs import Configs -from slpkg.models.models import PonceTable from slpkg.models.models import session as Session @@ -18,19 +17,12 @@ class Blacklist(Configs): def packages(self) -> list: """ Reads the blacklist file. """ - toml_blacks, ponce_blacks = [], [] file_toml = Path(self.etc_path, 'blacklist.toml') - if self.ponce_repo: - sbos: list = self.session.query(PonceTable.name).all() # type: ignore - ponce_blacks: list = [sbo[0] for sbo in sbos] - if file_toml.is_file(): try: with open(file_toml, 'rb') as black: - toml_blacks = tomli.load(black)['blacklist']['packages'] + return tomli.load(black)['blacklist']['packages'] except tomli.TOMLDecodeError as error: raise SystemExit(f"\nValueError: {error}: in the configuration file " "'/etc/slpkg/blacklist.toml'\n") - - return toml_blacks + ponce_blacks