diff --git a/CHANGELOG.md b/CHANGELOG.md index a4bb5e03..f905ddfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - AppImage - some installed applications cannot be launched by their desktop entries (regression from **0.9.10**) [#155](https://github.com/vinifmor/bauh/issues/155). If any of your installed AppImages are affected by this issue, just reinstall them. +- Flatpak + - crashing for Flatpak 1.6.5 when there are updates [#145](https://github.com/vinifmor/bauh/issues/145) ## [0.9.10] 2020-12-11 ### Features diff --git a/bauh/gems/flatpak/flatpak.py b/bauh/gems/flatpak/flatpak.py index e39f048a..f5e61286 100755 --- a/bauh/gems/flatpak/flatpak.py +++ b/bauh/gems/flatpak/flatpak.py @@ -204,19 +204,20 @@ def read_updates(version: str, installation: str) -> Dict[str, set]: if o: line_split = o.decode().strip().split('\t') - if version >= '1.5.0': - update_id = '{}/{}/{}'.format(line_split[2], line_split[3], installation) - else: - update_id = '{}/{}/{}'.format(line_split[2], line_split[4], installation) + if len(line_split) > 2: + if version >= '1.5.0': + update_id = '{}/{}/{}'.format(line_split[2], line_split[3], installation) + else: + update_id = '{}/{}/{}'.format(line_split[2], line_split[4], installation) - if len(line_split) >= 6: - if line_split[4] != 'i': - if '(partial)' in line_split[-1]: - res['partial'].add(update_id) - else: - res['full'].add(update_id) - else: - res['full'].add(update_id) + if len(line_split) >= 6: + if line_split[4] != 'i': + if '(partial)' in line_split[-1]: + res['partial'].add(update_id) + else: + res['full'].add(update_id) + else: + res['full'].add(update_id) except: traceback.print_exc()