Features
- Showing the number of apps and runtime updates available

Fixes
- Retrieving information for the same AppId from different branches.
This commit is contained in:
Vinícius Moreira
2019-06-24 13:05:03 -03:00
committed by GitHub
parent f36991ea1f
commit 7ec62618fa
4 changed files with 22 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ def app_str_to_json(line: str, version: str) -> dict:
else:
raise Exception('Unsupported version')
info = re.findall('\w+:\s.+', get_app_info(app['id']))
info = re.findall(r'\w+:\s.+', get_app_info(app['id'], app['branch']))
fields_to_get = ['origin', 'arch', 'ref']
for field in info:
@@ -53,8 +53,8 @@ def get_version():
return res.split(' ')[1].strip() if res else None
def get_app_info(app_id: str):
return system.run_cmd('flatpak info ' + app_id)
def get_app_info(app_id: str, branch: str):
return system.run_cmd('flatpak info {} {}'.format(app_id, branch))
def list_installed() -> List[dict]: