From 7f581fde86cb8d8b5014fa6a2e929f7d73e3dbb7 Mon Sep 17 00:00:00 2001 From: Matt Rose Date: Thu, 15 Feb 2024 22:16:33 -0500 Subject: [PATCH] fix traceback in layout_done Got this while testing layouts. Easy fix Traceback (most recent call last): File "/home/mattrose/Code/terminator/./terminator", line 137, in TERMINATOR.layout_done() File "/home/mattrose/Code/terminator/terminatorlib/terminator.py", line 341, in layout_done term.ensure_visible_and_focussed() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'ensure_visible_and_focussed' --- terminatorlib/terminator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 4da976f7..8b5ac0d9 100644 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -338,7 +338,8 @@ class Terminator(Borg): # For windows without a notebook ensure Terminal is visible and focused if window_last_active_term_mapping[window]: term = self.find_terminal_by_uuid(window_last_active_term_mapping[window].urn) - term.ensure_visible_and_focussed() + if term: + term.ensure_visible_and_focussed() # Build list of new windows using prelayout list new_win_list = []