[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

@@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [0.9.27]
### Fixes
- Arch
- silent crash when handling and displaying transaction sub-status
- AppImage
- search: displaying duplicate installed apps for some cases

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