From 136da2b4709c87bc4c7d076f2a662de07a44adfa Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Wed, 24 Jul 2024 09:57:30 +0200 Subject: [PATCH] exit if another tray is discovered --- client/ayon_core/tools/tray/ui/tray.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/client/ayon_core/tools/tray/ui/tray.py b/client/ayon_core/tools/tray/ui/tray.py index 51fde675ad..660c61ac94 100644 --- a/client/ayon_core/tools/tray/ui/tray.py +++ b/client/ayon_core/tools/tray/ui/tray.py @@ -184,9 +184,13 @@ class TrayManager: self._update_check_timer.start() self.execute_in_main_thread(self._startup_validations) - set_tray_server_url( - self._addons_manager.webserver_url, True - ) + try: + set_tray_server_url( + self._addons_manager.webserver_url, True + ) + except TrayIsRunningError: + self.log.warning("Other tray started meanwhile. Exiting.") + self.exit() def get_services_submenu(self): return self._services_submenu