Refactoring and improvements (#12)

* Removing controller

* Refactoring FlatpakManager

* Retrieving only installed apps data from the API

* Removing wrong password logs
This commit is contained in:
Vinícius Moreira
2019-06-26 18:32:49 -03:00
committed by GitHub
parent c2e59ba757
commit 97477c4274
15 changed files with 268 additions and 330 deletions

View File

@@ -66,6 +66,11 @@ def get_app_info_fields(app_id: str, branch: str, fields: List[str] = [], check_
return data
def is_installed():
version = get_version()
return False if version is None else True
def get_version():
res = system.run_cmd('{} --version'.format(BASE_CMD))
return res.split(' ')[1].strip() if res else None
@@ -86,10 +91,6 @@ def list_installed() -> List[dict]:
return []
def update(app_ref: str) -> bool:
return bool(system.run_cmd('{} update -y {}'.format(BASE_CMD, app_ref)))
def update_and_stream(app_ref: str):
"""
Updates the app reference and streams Flatpak output,