From 03c7719c395baa062cb9bcd2d6703cde560a78ee Mon Sep 17 00:00:00 2001 From: Flowseal Date: Tue, 14 Apr 2026 16:58:54 +0300 Subject: [PATCH] mutex check simplify --- windows.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/windows.py b/windows.py index b489492..e3b5ecb 100644 --- a/windows.py +++ b/windows.py @@ -383,14 +383,9 @@ def run_tray() -> None: def main() -> None: - if mutex_result := _acquire_win_mutex() is False: + if (mutex_result := _acquire_win_mutex()) is False or mutex_result is None and not acquire_lock(): _show_info("Приложение уже запущено.", os.path.basename(sys.argv[0])) return - if mutex_result is None: - log.warning("Named mutex unavailable, falling back to lock file") - if not acquire_lock(): - _show_info("Приложение уже запущено.", os.path.basename(sys.argv[0])) - return try: run_tray()