mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-26 09:58:31 +01:00
Updated for pathlib module
This commit is contained in:
parent
e736bcb026
commit
a6c7e8b966
1 changed files with 5 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
import os
|
||||
import shutil
|
||||
from typing import Any
|
||||
from pathlib import Path
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
from slpkg.configs import Configs
|
||||
|
@ -180,7 +181,10 @@ class ViewMessage:
|
|||
|
||||
def _view_removed(self, name: str):
|
||||
""" View and creates list with packages for remove. """
|
||||
installed = os.listdir(self.configs.log_packages)
|
||||
pattern = f'*{self.configs.sbo_repo_tag}'
|
||||
|
||||
var_log_packages = Path(self.configs.log_packages)
|
||||
installed = [file.name for file in var_log_packages.glob(pattern)]
|
||||
|
||||
if self.utils.is_installed(name):
|
||||
for package in installed:
|
||||
|
|
Loading…
Reference in a new issue