[arch] fix -> multi-threaded download: crashing when could not retrieve download data for packages to upgrade

This commit is contained in:
Vinicius Moreira
2021-02-03 11:03:25 -03:00
parent c566b90264
commit 65c8170db5
3 changed files with 10 additions and 3 deletions

View File

@@ -160,6 +160,12 @@ class MultithreadedDownloadService:
downloaded = 0
pkgs_data = pacman.list_download_data(pkgs)
if not pkgs_data:
error_msg = "Could not retrieve download data of the following packages: {}".format(', '.join(pkgs))
watcher.print(error_msg)
self.logger.error(error_msg)
return 0
for pkg in pkgs_data:
self.logger.info('Preparing to download package: {} ({})'.format(pkg['n'], pkg['v']))
try: