Fixed for none dependencies

This commit is contained in:
Dimitris Zlatanidis 2023-05-17 08:20:57 +03:00
parent d7884e83a7
commit 0c51f82d68

View file

@ -134,18 +134,19 @@ class RemovePackages(Configs):
self.session.commit()
def choose_dependencies_for_remove(self) -> None:
height: int = 10
width: int = 70
list_height: int = 0
choices: list = []
title: str = " Choose dependencies you want to remove "
if self.dependencies:
height: int = 10
width: int = 70
list_height: int = 0
choices: list = []
title: str = " Choose dependencies you want to remove "
for package in self.dependencies:
installed_package: str = self.utils.is_package_installed(package)
installed_version: str = self.utils.split_package(installed_package)['version']
choices.extend([(package, installed_version, True, f'Package: {installed_package}')])
for package in self.dependencies:
installed_package: str = self.utils.is_package_installed(package)
installed_version: str = self.utils.split_package(installed_package)['version']
choices.extend([(package, installed_version, True, f'Package: {installed_package}')])
text: str = f'There are {len(choices)} dependencies:'
code, self.dependencies = self.dialogbox.checklist(text, self.dependencies, title, height,
width, list_height, choices)
os.system('clear')
text: str = f'There are {len(choices)} dependencies:'
code, self.dependencies = self.dialogbox.checklist(text, self.dependencies, title, height,
width, list_height, choices)
os.system('clear')