[appimage] improved the way sqlite3 and wget are checked

This commit is contained in:
Vinicius Moreira
2019-10-14 17:47:20 -03:00
parent 6d9cd42e4f
commit fd4df6d902
2 changed files with 6 additions and 11 deletions

View File

@@ -340,18 +340,12 @@ class AppImageManager(SoftwareManager):
self.enabled = enabled
def _is_sqlite3_available(self):
try:
new_subprocess(['sqlite3', '--version'])
return True
except FileNotFoundError:
return False
res = run_cmd('which sqlite3')
return res and not res.strip().startswith('which ')
def _is_wget_available(self):
try:
new_subprocess(['wget', '--version'])
return True
except FileNotFoundError:
return False
res = run_cmd('which wget')
return res and not res.strip().startswith('which ')
def can_work(self) -> bool:
return self._is_sqlite3_available() and self._is_wget_available()