From d9a84f81e82f908b70942a9fdc7670118f7a1176 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 7 May 2023 16:45:22 +0300 Subject: [PATCH] Updated for methods --- slpkg/search.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/slpkg/search.py b/slpkg/search.py index 2a902e53..48bbd916 100644 --- a/slpkg/search.py +++ b/slpkg/search.py @@ -30,17 +30,20 @@ class SearchPackage(Configs): f'packages that contains \'{", ".join([p for p in self.packages])}\':\n') if self.repository == '*': - for repo, value in self.repos.repositories.items(): - if value[0]: # Check if the repository is enabled - if self.utils.is_binary_repo(repo): - self.search_into_binary_repositories(repo) - else: - self.search_into_slackbuild_repositories(repo) + self.search_to_enabled_repositories() else: self.search_for_packages() self.summary_of_searching() + def search_to_enabled_repositories(self): + for repo, value in self.repos.repositories.items(): + if value[0]: # Check if the repository is enabled + if self.utils.is_binary_repo(repo): + self.search_into_binary_repositories(repo) + else: + self.search_into_slackbuild_repositories(repo) + def search_into_binary_repositories(self, repo): data: dict = BinQueries(repo).repository_data() for package in self.packages: