mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 21:44:16 +02:00
[flatpak] fix: crashing when trying to retrieve size of runtimes subcomponents
This commit is contained in:
@@ -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