mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-01 07:57:26 +01:00
Updated for options check
This commit is contained in:
parent
8865d0a58b
commit
5bb3d19072
1 changed files with 4 additions and 4 deletions
|
@ -24,12 +24,12 @@ class Upgrade(Configs):
|
||||||
self.utils = Utilities()
|
self.utils = Utilities()
|
||||||
self.repos = Repositories()
|
self.repos = Repositories()
|
||||||
|
|
||||||
|
self.repo_for_binaries: bool = self.utils.is_option(['-B', '--bin-repo='], self.flags)
|
||||||
|
|
||||||
self.bin_repo_dict: dict = {}
|
self.bin_repo_dict: dict = {}
|
||||||
self.sbo_repo_dict: dict = {}
|
self.sbo_repo_dict: dict = {}
|
||||||
self.flag_bin_repository: list = ['-B', '--bin-repo=']
|
|
||||||
self.repo_for_binaries: bool = self.utils.is_option(self.flag_bin_repository, self.flags)
|
|
||||||
|
|
||||||
if self.utils.is_option(self.flag_bin_repository, self.flags):
|
if self.repo_for_binaries:
|
||||||
self.bin_repo_dict: dict = BinQueries(self.repo).repository_data()
|
self.bin_repo_dict: dict = BinQueries(self.repo).repository_data()
|
||||||
else:
|
else:
|
||||||
self.sbo_repo_dict: dict = SBoQueries('').repository_data()
|
self.sbo_repo_dict: dict = SBoQueries('').repository_data()
|
||||||
|
@ -41,7 +41,7 @@ class Upgrade(Configs):
|
||||||
|
|
||||||
def packages(self) -> Generator[str, None, None]:
|
def packages(self) -> Generator[str, None, None]:
|
||||||
""" Returns the upgradable packages. """
|
""" Returns the upgradable packages. """
|
||||||
if self.utils.is_option(self.flag_bin_repository, self.flags):
|
if self.repo_for_binaries:
|
||||||
repo_packages: list = list(self.bin_repo_dict.keys())
|
repo_packages: list = list(self.bin_repo_dict.keys())
|
||||||
else:
|
else:
|
||||||
repo_packages: list = list(self.sbo_repo_dict.keys())
|
repo_packages: list = list(self.sbo_repo_dict.keys())
|
||||||
|
|
Loading…
Add table
Reference in a new issue