Fix package.py error handling bug (#39017)

This commit is contained in:
Jordan Galby 2023-08-09 17:47:43 +02:00 committed by GitHub
parent deadb64206
commit c36617f9da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1256,9 +1256,8 @@ def make_stack(tb, stack=None):
func = getattr(obj, tb.tb_frame.f_code.co_name, "")
if func:
typename, *_ = func.__qualname__.partition(".")
if isinstance(obj, CONTEXT_BASES) and typename not in basenames:
break
if isinstance(obj, CONTEXT_BASES) and typename not in basenames:
break
else:
return None