mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[flatpak] fix: random index out of bounds exception when reading updates
This commit is contained in:
@@ -57,6 +57,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- some updates or download sizes not being displayed when there are new required runtimes for installed Flatpaks
|
||||
- not displaying new required runtimes as updates (requires Flatpak >= 1.12)
|
||||
- upgrade: informing the download size as the additional installation size
|
||||
- random index out of bounds exception when reading updates
|
||||
|
||||
- UI
|
||||
- not displaying the right unit symbol for byte based sizes (kB, MB, TB, ...) [#250](https://github.com/vinifmor/bauh/issues/250)
|
||||
|
||||
@@ -247,11 +247,18 @@ def fill_updates(version: Version, installation: str, res: Dict[str, Set[str]]):
|
||||
if o:
|
||||
line_split = o.decode().strip().split('\t')
|
||||
|
||||
if len(line_split) > 2:
|
||||
if len(line_split) >= 5:
|
||||
if version >= VERSION_1_5:
|
||||
update_id = f'{line_split[2]}/{line_split[3]}/{installation}/{line_split[5]}'
|
||||
update_id = f'{line_split[2]}/{line_split[3]}/{installation}'
|
||||
|
||||
if len(line_split) >= 6:
|
||||
update_id = f'{update_id}/{line_split[5]}'
|
||||
|
||||
elif version >= VERSION_1_2:
|
||||
update_id = f'{line_split[2]}/{line_split[4]}/{installation}/{line_split[5]}'
|
||||
update_id = f'{line_split[2]}/{line_split[4]}/{installation}'
|
||||
|
||||
if len(line_split) >= 6:
|
||||
update_id = f'{update_id}/{line_split[5]}'
|
||||
else:
|
||||
update_id = f'{line_split[2]}/{line_split[4]}/{installation}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user