mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 03:34:15 +02:00
[ui] fix: upgrading: only requesting the root password if required | [flatpak] fix -> crashing when trying to downgrade
This commit is contained in:
@@ -17,7 +17,7 @@ from pkg_resources import parse_version
|
||||
|
||||
from bauh.api.abstract.context import ApplicationContext
|
||||
from bauh.api.abstract.controller import SoftwareManager, SearchResult, UpgradeRequirements, UpgradeRequirement, \
|
||||
TransactionResult
|
||||
TransactionResult, SoftwareAction
|
||||
from bauh.api.abstract.disk import DiskCacheLoader
|
||||
from bauh.api.abstract.handler import ProcessWatcher, TaskManager
|
||||
from bauh.api.abstract.model import SoftwarePackage, PackageHistory, PackageUpdate, PackageSuggestion, \
|
||||
@@ -416,7 +416,8 @@ class AppImageManager(SoftwareManager):
|
||||
app_tuple = cursor.fetchone()
|
||||
|
||||
if not app_tuple:
|
||||
raise Exception("Could not retrieve {} from the database {}".format(pkg, DB_APPS_PATH))
|
||||
self.logger.warning("Could not retrieve {} from the database {}".format(pkg, DB_APPS_PATH))
|
||||
return res
|
||||
finally:
|
||||
self._close_connection(DB_APPS_PATH, connection)
|
||||
|
||||
@@ -582,7 +583,7 @@ class AppImageManager(SoftwareManager):
|
||||
def can_work(self) -> bool:
|
||||
return self._is_sqlite3_available() and self.file_downloader.can_work()
|
||||
|
||||
def requires_root(self, action: str, pkg: AppImage):
|
||||
def requires_root(self, action: SoftwareAction, pkg: AppImage) -> bool:
|
||||
return False
|
||||
|
||||
def prepare(self, task_manager: TaskManager, root_password: str, internet_available: bool):
|
||||
|
||||
Reference in New Issue
Block a user