Merge "Fix fo() backdoor command for non-class objects"

This commit is contained in:
Zuul 2021-10-13 15:29:08 +00:00 committed by Gerrit Code Review
commit 7a62271de3
2 changed files with 8 additions and 1 deletions

View File

@ -86,7 +86,8 @@ def _detailed_dump_frames(f, thread_index):
def _find_objects(t):
return [o for o in gc.get_objects() if isinstance(o, t)]
return [o for o in gc.get_objects()
if hasattr(o, "__class__") and isinstance(o, t)]
def _capture_profile(fname=''):

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fix the backdoor helper method fo() to also work when there are objects
present in the current python instance that do not have a __class__
attribute.