diff --git a/slpkg/views/views.py b/slpkg/views/views.py index dc4ef2f2..a79fcbb4 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -214,20 +214,19 @@ class ViewMessage(Configs): install = upgrade = remove = size_comp = size_uncomp = size_rmv = 0 for pkg in packages: + installed: str = self.utils.is_package_installed(pkg) if self.option_for_binaries: size_comp += int(''.join(re.findall(r'\d+', self.data[pkg][4]))) size_uncomp += int(''.join(re.findall(r'\d+', self.data[pkg][5]))) + if installed and option == 'remove': + size_rmv += Path(self.log_packages, installed).stat().st_size + upgradeable: bool = False if option != 'remove': upgradeable: bool = self.upgrade.is_package_upgradeable(pkg) - installed: str = self.utils.is_package_installed(pkg) - - if installed and option == 'remove': - size_rmv += Path(self.log_packages, installed).stat().st_size - if not installed: install += 1 elif installed and self.option_for_reinstall: