mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 21:44:16 +02:00
[fix]flatpak] an exception happens when trying to retrieve the information from partials in Flatpak 1.4
This commit is contained in:
@@ -38,6 +38,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- downgrade: pre-downloading sources from the latest version instead of the older
|
||||
- Flatpak:
|
||||
- displaying "No Internet connection" when an error happens during commits reading within the downgrade process
|
||||
- an exception happens when trying to retrieve the information from partials in Flatpak 1.4
|
||||
- UI:
|
||||
- **About** window icons scaling
|
||||
- Toolbar buttons get hidden [#5](https://github.com/vinifmor/bauh/issues/5)
|
||||
|
||||
@@ -11,7 +11,12 @@ RE_SEVERAL_SPACES = re.compile(r'\s+')
|
||||
|
||||
|
||||
def get_app_info_fields(app_id: str, branch: str, installation: str, fields: List[str] = [], check_runtime: bool = False):
|
||||
info = re.findall(r'\w+:\s.+', get_app_info(app_id, branch, installation))
|
||||
info = get_app_info(app_id, branch, installation)
|
||||
|
||||
if not info:
|
||||
return {}
|
||||
|
||||
info = re.findall(r'\w+:\s.+', info)
|
||||
data = {}
|
||||
fields_to_retrieve = len(fields) + (1 if check_runtime and 'ref' not in fields else 0)
|
||||
|
||||
@@ -62,7 +67,11 @@ def get_version():
|
||||
|
||||
|
||||
def get_app_info(app_id: str, branch: str, installation: str):
|
||||
return run_cmd('{} info {} {}'.format('flatpak', app_id, branch, '--{}'.format(installation)))
|
||||
try:
|
||||
return run_cmd('{} info {} {}'.format('flatpak', app_id, branch, '--{}'.format(installation)))
|
||||
except:
|
||||
traceback.print_exc()
|
||||
return ''
|
||||
|
||||
|
||||
def get_commit(app_id: str, branch: str, installation: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user