core[patch] Do not try to access attribute of None (#16321)

pull/13819/head
Nuno Campos 5 months ago committed by GitHub
parent 4b7969efc5
commit 226fe645f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -248,7 +248,12 @@ def get_function_nonlocals(func: Callable) -> List[Any]:
if "." in kk and kk.startswith(k):
vv = v
for part in kk.split(".")[1:]:
vv = getattr(vv, part)
if vv is None:
break
else:
vv = getattr(vv, part)
else:
values.append(vv)
values.append(vv)
return values
except (SyntaxError, TypeError, OSError):

Loading…
Cancel
Save