[view.core.controller] fix: install/uninstall logs

This commit is contained in:
Vinicius Moreira
2021-11-20 10:51:50 -03:00
parent 11af3c0bbc
commit 84518ce34d

View File

@@ -327,7 +327,7 @@ class GenericSoftwareManager(SoftwareManager):
return TransactionResult(success=False, installed=[], removed=[]) return TransactionResult(success=False, installed=[], removed=[])
finally: finally:
tf = time.time() tf = time.time()
self.logger.info('Uninstallation of {}'.format(pkg) + 'took {0:.2f} minutes'.format((tf - ti) / 60)) self.logger.info(f'Uninstallation of {pkg} took {(tf - ti) / 60:.2f} minutes')
def install(self, app: SoftwarePackage, root_password: str, disk_loader: DiskCacheLoader, handler: ProcessWatcher) -> TransactionResult: def install(self, app: SoftwarePackage, root_password: str, disk_loader: DiskCacheLoader, handler: ProcessWatcher) -> TransactionResult:
man = self._get_manager_for(app) man = self._get_manager_for(app)
@@ -348,7 +348,7 @@ class GenericSoftwareManager(SoftwareManager):
return TransactionResult(success=False, installed=[], removed=[]) return TransactionResult(success=False, installed=[], removed=[])
finally: finally:
tf = time.time() tf = time.time()
self.logger.info('Installation of {}'.format(app) + 'took {0:.2f} minutes'.format((tf - ti)/60)) self.logger.info(f'Installation of {app} took {(tf - ti) / 60:.2f} minutes')
def get_info(self, app: SoftwarePackage): def get_info(self, app: SoftwarePackage):
man = self._get_manager_for(app) man = self._get_manager_for(app)