Fixed for binary repo

This commit is contained in:
Dimitris Zlatanidis 2023-04-04 18:58:35 +03:00
parent e638d2caa4
commit b52aa6733b

View file

@ -52,7 +52,7 @@ class Argparse(Configs):
self.red: str = self.color['red']
self.endc: str = self.color['endc']
self.bred: str = f'{self.bold}{self.red}'
self.binary_repo = None
self.binary_repo: str = ''
if len(self.args) == 0 or '' in self.args:
self.usage.help_short(1)
@ -277,10 +277,10 @@ class Argparse(Configs):
self.split_options_from_args()
self.move_options()
self.invalid_options()
self.check_for_bin_repositories()
self.check = Check(self.flags)
self.check.is_blacklist(self.args[1:])
self.check_for_bin_repositories()
def check_for_bin_repositories(self) -> None:
""" Checks combination for binaries use repositories only and if repository exists. """
@ -381,10 +381,13 @@ class Argparse(Configs):
try:
self.binary_repo: str = self.args[self.args.index(arg) + 1]
except IndexError:
self.binary_repo: str = ''
self.binary_repo = ''
else:
self.args.remove(self.binary_repo)
if self.binary_repo in self.options:
self.binary_repo: str = ''
def move_options(self) -> None:
""" Move options to the flags and removes from the arguments. """
new_args: list = []