mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[flatpak] fix: crashing when trying to retrieve size of runtimes subcomponents
This commit is contained in:
@@ -20,6 +20,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- calling pacman to read installed packages when "Repositories" and "AUR" properties are set to "false" (it would not display the packages, but the call was unnecessary being done)
|
||||
- not displaying installed AUR packages when AUR support is disabled
|
||||
- downloading AUR index during the initialization process when AUR support is disabled
|
||||
- Flatpak
|
||||
- crashing when trying to retrieve size of runtimes subcomponents [#164](https://github.com/vinifmor/bauh/issues/164)
|
||||
- UI
|
||||
- displaying a popup when information of a given package is not available
|
||||
|
||||
|
||||
@@ -411,12 +411,15 @@ def map_update_download_size(app_ids: Iterable[str], installation: str, version:
|
||||
|
||||
related_id = [appid for appid in app_ids if appid == line_id]
|
||||
|
||||
if related_id:
|
||||
size = p2.findall(line_split[6])[0].split('?')
|
||||
if related_id and len(line_split) >= 7:
|
||||
size_tuple = p2.findall(line_split[6])
|
||||
|
||||
if size and len(size) > 1:
|
||||
try:
|
||||
res[related_id[0].strip()] = size_to_byte(float(size[0]), size[1])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
if size_tuple:
|
||||
size = size_tuple[0].split('?')
|
||||
|
||||
if size and len(size) > 1:
|
||||
try:
|
||||
res[related_id[0].strip()] = size_to_byte(float(size[0]), size[1])
|
||||
except:
|
||||
traceback.print_exc()
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user