From c34ade942338708e4ea15976086877a1f1b4a40e Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Wed, 17 Jun 2026 05:32:07 +0545 Subject: [PATCH] fix(src/shared/window): suppress harmless disconnect errors in logger Reduce noise by only logging disconnect errors that aren't "nothing connected" --- src/shared/window/popup_win.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/window/popup_win.py b/src/shared/window/popup_win.py index 624470a..727ad1b 100644 --- a/src/shared/window/popup_win.py +++ b/src/shared/window/popup_win.py @@ -52,7 +52,8 @@ class PopupWindow(WaylandWindow): try: self._pointing_widget.disconnect_by_func(self.do_handle_size_allocate) except Exception as e: - logger.error(f"An error occurred: {e}") + if "nothing connected" not in str(e): + logger.error(f"Error disconnecting signal: {e}") self._pointing_widget = widget return self.do_update_handlers() @@ -75,7 +76,8 @@ class PopupWindow(WaylandWindow): self._pointing_widget.disconnect_by_func(self.do_handle_size_allocate) self.disconnect_by_func(self.do_handle_size_allocate) except Exception as e: - logger.error(f"An error occurred: {e}") + if "nothing connected" not in str(e): + logger.error(f"Error disconnecting signal: {e}") return self._pointing_widget.connect("size-allocate", self.do_handle_size_allocate)