improvement: replacing subprocess commands to detected installed CLIs by Python faster native calls (shutil.which)

This commit is contained in:
Vinicius Moreira
2021-06-15 17:09:49 -03:00
parent dfdc209374
commit 9a8772da8f
14 changed files with 36 additions and 37 deletions

View File

@@ -2649,9 +2649,8 @@ class ArchManager(SoftwareManager):
return res
def _is_wget_available(self):
res = run_cmd('which wget')
return res and not res.strip().startswith('which ')
def _is_wget_available(self) -> bool:
return bool(shutil.which('wget'))
def is_enabled(self) -> bool:
return self.enabled