mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-26 19:58:50 +01:00
50ff4ed14f
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
21 lines
462 B
Python
21 lines
462 B
Python
#!/usr/bin/python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
import os
|
|
import yaml
|
|
from dataclasses import dataclass
|
|
|
|
from slpkg.configs import Configs
|
|
|
|
|
|
@dataclass
|
|
class Blacklist:
|
|
''' Reads and returns the blacklist. '''
|
|
etc_path: str = Configs.etc_path
|
|
|
|
def get(self):
|
|
file = f'{self.etc_path}/blacklist.yml'
|
|
if os.path.isfile(file):
|
|
with open(file, 'r') as black:
|
|
return yaml.safe_load(black)['blacklist']['packages']
|