From e6e7ee6867f401b0851f371e3ddd78e6e1fe3853 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 27 Jul 2021 17:51:17 +0200 Subject: [PATCH] use callback directly --- openpype/modules/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openpype/modules/base.py b/openpype/modules/base.py index 87d6c4cbbc..dd144075e1 100644 --- a/openpype/modules/base.py +++ b/openpype/modules/base.py @@ -149,12 +149,12 @@ class ITrayModule: Some callbacks need to be processed on main thread (menu actions must be added on main thread or they won't get triggered etc.) """ - # called without initialized tray, still main thread needed if not self.tray_initialized: + # TODO Called without initialized tray, still main thread needed try: - callback = self._main_thread_callbacks.popleft() callback() - except: + + except Exception: self.log.warning( "Failed to execute {} in main thread".format(callback), exc_info=True)