not adding flathub remote when it is not set

This commit is contained in:
Vinicius Moreira
2019-07-30 17:35:46 -03:00
parent bfc13c1c01
commit 2f631ca903
8 changed files with 20 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
import re
import subprocess
from typing import List, Set
from typing import List
from fpakman.core import system
from fpakman.core.exception import NoInternetException
@@ -219,3 +219,7 @@ def install_and_stream(app_id: str, origin: str):
def set_default_remotes():
system.run_cmd('flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo')
def has_remotes_set() -> bool:
return bool(system.run_cmd('{} remotes'.format(BASE_CMD)).strip())