From 152bd9897829d724a8d561801643afb6b62af0ae Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Wed, 16 Oct 2019 16:27:38 -0300 Subject: [PATCH] [appimage] checking if aria2 is installed in 'can_work' --- bauh/gems/appimage/controller.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bauh/gems/appimage/controller.py b/bauh/gems/appimage/controller.py index 495676cd..51ba3827 100644 --- a/bauh/gems/appimage/controller.py +++ b/bauh/gems/appimage/controller.py @@ -361,8 +361,12 @@ class AppImageManager(SoftwareManager): res = run_cmd('which wget') return res and not res.strip().startswith('which ') + def _is_aria2_available(self): + res = run_cmd('which aria2c') + return res and not res.strip().startswith('which ') + def can_work(self) -> bool: - return self._is_sqlite3_available() and self._is_wget_available() + return self._is_sqlite3_available() and (self._is_wget_available() or self._is_aria2_available()) def requires_root(self, action: str, pkg: AppImage): return False