ignore accessed attributes missing on state class

these might be added dynamically later in which case we recompute the
dependency tracking dicts... if not, they'll blow up anyway at runtime.
This commit is contained in:
Masen Furer 2025-01-29 11:03:16 -08:00
parent c30e725715
commit 8f6dfdef9c
No known key found for this signature in database
GPG Key ID: 2AE2BD5531FF94F4

View File

@ -123,7 +123,11 @@ class DependencyTracker:
if not self.top_of_stack:
return
target_state = self.tracked_locals[self.top_of_stack]
ref_obj = getattr(target_state, instruction.argval)
try:
ref_obj = getattr(target_state, instruction.argval)
except AttributeError:
# Not found on this state class, maybe it is a dynamic attribute that will be picked up later.
ref_obj = None
if isinstance(ref_obj, property) and not isinstance(ref_obj, ComputedVar):
# recurse into property fget functions