From f774d2ef47d5084f83def5247716b0fb4d19989c Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 5 Mar 2023 10:57:10 +0200 Subject: [PATCH] Removed ponce table --- slpkg/blacklist.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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