Fix: Retrieving information for the same AppId with different branches

This commit is contained in:
Vinicius Moreira
2019-06-22 16:16:40 -03:00
parent 6136d83d31
commit 02cbafb487
2 changed files with 7 additions and 3 deletions

View File

@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [0.2.1] - 2019-06-22
### Fixes
- Retrieving information for the same AppId with different branches.
## [0.2.0] - 2019-06-18 ## [0.2.0] - 2019-06-18
### Features ### Features
- Management panel shows update commands streams - Management panel shows update commands streams

View File

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