Added message for db loading

This commit is contained in:
Dimitris Zlatanidis 2023-05-25 21:41:44 +03:00
parent 0d89d7cf1d
commit 7d379b228f

View file

@ -18,6 +18,7 @@ from slpkg.search import SearchPackage
from slpkg.views.cli_menu import Usage
from slpkg.dialog_box import DialogBox
from slpkg.views.version import Version
from slpkg.views.asciibox import AsciiBox
from slpkg.sbos.queries import SBoQueries
from slpkg.views.help_commands import Help
from slpkg.repositories import Repositories
@ -45,6 +46,7 @@ class Menu(Configs):
self.utils = Utilities()
self.usage = Usage()
self.repos = Repositories()
self.ascii = AsciiBox()
self.repository: str = self.repos.default_repository
@ -315,10 +317,12 @@ class Menu(Configs):
def load_database(self):
if self.repository != '*' and not self.data:
print('\rDatabase loading, please wait... ', end='')
if self.is_binary:
self.data: dict = BinQueries(self.repository).repository_data()
else:
self.data: dict = SBoQueries(self.repository).repository_data()
print(f'{self.yellow}{self.ascii.done}{self.endc}\n')
def check_for_repositories(self) -> None:
""" Checks combination for binaries use repositories only and if repository exists. """