[arch] fix: silent crash when handling and displaying transaction sub-status

This commit is contained in:
Vinicius Moreira
2022-02-09 10:52:16 -03:00
parent 8000babec8
commit 66ae8eb152
2 changed files with 5 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ class TransactionStatusHandler(Thread):
else:
self.watcher.change_substatus('{} {}'.format(self.i18n['uninstalling'].capitalize(), output_split[1].strip()))
elif output_split[1].lower().startswith('downloading') and (not self.names or (n for n in self.names if output_split[0].startswith(n))):
elif len(output_split) >= 2 and output_split[1].lower().startswith('downloading') and (not self.names or (n for n in self.names if output_split[0].startswith(n))):
if self.downloading < self.pkgs_to_sync:
perc = self.gen_percentage()
self.downloading += 1