Updated for except

This commit is contained in:
Dimitris Zlatanidis 2023-05-22 22:40:54 +03:00
parent 43c9739078
commit aefc6a654f

View file

@ -69,11 +69,10 @@ class SearchPackage(Configs):
}
def summary_of_searching(self) -> None:
name_length: int = 2
try:
name_length: int = max(len(name['name']) for name in self.data_dict.values())
except ValueError:
pass
name_length: int = 2
if self.matching:
for item in self.data_dict.values():
print(f"{item['repository']}: {self.cyan}{item['name']:<{name_length}}{self.endc} "