mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Updated for database load
This commit is contained in:
parent
073f0625b1
commit
8b444ff1f5
1 changed files with 6 additions and 4 deletions
|
@ -47,6 +47,7 @@ class Argparse(Configs):
|
|||
self.usage = Usage()
|
||||
self.form_configs = FormConfigs()
|
||||
self.repos = Repositories()
|
||||
self.check = None
|
||||
|
||||
self.repository: str = self.repos.default_repository
|
||||
|
||||
|
@ -312,8 +313,6 @@ class Argparse(Configs):
|
|||
|
||||
self.is_binary: bool = self.utils.is_binary_repo(self.repository)
|
||||
|
||||
self.check = Check(self.repository, self.data)
|
||||
|
||||
logging.basicConfig(filename=LoggingConfig.log_file,
|
||||
filemode=LoggingConfig.filemode,
|
||||
encoding=LoggingConfig.encoding,
|
||||
|
@ -346,6 +345,9 @@ class Argparse(Configs):
|
|||
else:
|
||||
self.data: dict = SBoQueries(self.repository).repository_data()
|
||||
|
||||
# Create object for the checks
|
||||
self.check = Check(self.repository, self.data)
|
||||
|
||||
def invalid_options(self) -> None:
|
||||
""" Checks for invalid options. """
|
||||
invalid, commands, repeat = [], [], []
|
||||
|
@ -709,11 +711,11 @@ class Argparse(Configs):
|
|||
command: str = Argparse.find.__name__
|
||||
|
||||
if len(self.args) >= 2:
|
||||
self.load_database()
|
||||
self.check.is_database_empty()
|
||||
packages: list = self.is_file_list_packages()
|
||||
|
||||
if self.utils.is_option(self.flag_no_cases, self.flags) or not self.case_sensitive:
|
||||
self.load_database()
|
||||
packages: list = self.utils.case_insensitive_pattern_matching(packages, self.data)
|
||||
|
||||
if self.utils.is_option(self.flag_searches, self.flags):
|
||||
|
@ -753,11 +755,11 @@ class Argparse(Configs):
|
|||
command: str = Argparse.search.__name__
|
||||
|
||||
if len(self.args) >= 2:
|
||||
self.load_database()
|
||||
self.check.is_database_empty()
|
||||
packages: list = self.is_file_list_packages()
|
||||
|
||||
if self.utils.is_option(self.flag_no_cases, self.flags) or not self.case_sensitive:
|
||||
self.load_database()
|
||||
packages: list = self.utils.case_insensitive_pattern_matching(packages, self.data)
|
||||
|
||||
if self.utils.is_option(self.flag_searches, self.flags):
|
||||
|
|
Loading…
Add table
Reference in a new issue