mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-31 10:26:39 +01:00
Updated for installed
This commit is contained in:
parent
2b39b88986
commit
c5b62a936b
1 changed files with 4 additions and 13 deletions
|
@ -40,20 +40,11 @@ class Utilities(Configs):
|
|||
|
||||
def all_installed(self) -> dict:
|
||||
""" Return all installed packages from /val/log/packages folder. """
|
||||
var_log_packages: Path = Path(self.log_packages)
|
||||
for file in self.log_packages.glob(self.file_pattern):
|
||||
name: str = self.split_binary_pkg(file.name)[0]
|
||||
|
||||
try:
|
||||
for file in var_log_packages.glob(self.file_pattern):
|
||||
name = self.split_binary_pkg(file.name)[0]
|
||||
|
||||
if not name.startswith('.') and not self.blacklist_pattern(name):
|
||||
yield name, file.name
|
||||
|
||||
except ValueError as err:
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.info('%s: %s: %s', self.__class__.__name__,
|
||||
Utilities.all_installed.__name__,
|
||||
err)
|
||||
if not name.startswith('.') and not self.blacklist_pattern(name):
|
||||
yield name, file.name
|
||||
|
||||
@staticmethod
|
||||
def remove_file_if_exists(path: Path, file: str) -> None:
|
||||
|
|
Loading…
Reference in a new issue