From aeaf5b899329333d127720ec540acf45c3393f86 Mon Sep 17 00:00:00 2001 From: Matt Jones <47545907+SoundMatt@users.noreply.github.com> Date: Fri, 22 May 2026 10:30:03 -0700 Subject: [PATCH] fix(type_checking_constructor_mixin): replace bare except with except AttributeError The bare `except:` block is used to handle the case where `self` has no `.name` attribute. Narrow it to `except AttributeError` so that `KeyboardInterrupt` and other fatal signals are not inadvertently swallowed. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com> --- ifex/models/common/type_checking_constructor_mixin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ifex/models/common/type_checking_constructor_mixin.py b/ifex/models/common/type_checking_constructor_mixin.py index 8672357e..e35ad10a 100644 --- a/ifex/models/common/type_checking_constructor_mixin.py +++ b/ifex/models/common/type_checking_constructor_mixin.py @@ -100,7 +100,7 @@ def type_checking_constructor(self, *args, **kwargs): if not is_correct_type(value, arg_types[name]): try: nameinfo = f"Additional Info: The object was named: {self.name}" - except: + except AttributeError: nameinfo = "" raise TypeError(f'Object construction error for class {type(self)}: According to specification, value named \'{name}\' must be of type: {arg_types[name]}, but was instead: {type(value)!r}. {nameinfo}')