From 73b3f94c8238291c2ddcb2972b0527c421213e6a Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 22 May 2023 22:38:53 +0300 Subject: [PATCH] Fixed ValueError --- ChangeLog.txt | 2 ++ slpkg/search.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 8d70ee3d..74d42925 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,8 @@ 4.8.6 - 21/05/2023 Updated: - Load the database when used #172 +Fixed: +- ValueError with search command 4.8.5 - 18/05/2023 Fixed: diff --git a/slpkg/search.py b/slpkg/search.py index 4fe2e051..0e25c582 100644 --- a/slpkg/search.py +++ b/slpkg/search.py @@ -69,7 +69,10 @@ class SearchPackage(Configs): } def summary_of_searching(self) -> None: - name_length: int = max(len(name['name']) for name in self.data_dict.values()) + try: + name_length: int = max(len(name['name']) for name in self.data_dict.values()) + except ValueError: + pass if self.matching: for item in self.data_dict.values(): print(f"{item['repository']}: {self.cyan}{item['name']:<{name_length}}{self.endc} "