GUI: Fix possible result mismatch on concurrency

This commit is contained in:
deajan 2025-06-05 09:51:37 +02:00
parent fd20e60d45
commit 12acb0d2b1

View file

@ -467,7 +467,10 @@ def restore_window(
__autoclose=True, __autoclose=True,
__no_lock=__no_lock, __no_lock=__no_lock,
) )
try:
return result["result"] return result["result"]
except TypeError:
return result
left_col = [ left_col = [
[ [
@ -520,7 +523,10 @@ def backup(repo_config: dict) -> bool:
__backend_binary=backend_binary, __backend_binary=backend_binary,
__no_lock=__no_lock, __no_lock=__no_lock,
) )
try:
return result["result"] return result["result"]
except TypeError:
return result
def forget_snapshot(repo_config: dict, snapshot_ids: List[str]) -> bool: def forget_snapshot(repo_config: dict, snapshot_ids: List[str]) -> bool:
@ -536,7 +542,10 @@ def forget_snapshot(repo_config: dict, snapshot_ids: List[str]) -> bool:
__backend_binary=backend_binary, __backend_binary=backend_binary,
__no_lock=__no_lock, __no_lock=__no_lock,
) )
try:
return result["result"] return result["result"]
except TypeError:
return result
def _main_gui(viewer_mode: bool): def _main_gui(viewer_mode: bool):