[flatpak] fix -> crashing when an update size cannot be read

This commit is contained in:
Vinicius Moreira
2020-08-12 11:56:42 -03:00
parent dd8683063b
commit a027412842
2 changed files with 7 additions and 1 deletions

View File

@@ -415,5 +415,10 @@ def map_update_download_size(app_ids: Iterable[str], installation: str, version:
if related_id:
size = p2.findall(line_split[6])[0].split('?')
res[related_id[0].strip()] = size_to_byte(float(size[0]), size[1])
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