fhdl/namer: do not reference objects with __del__ methods to avoid uncollectable cycles

This commit is contained in:
Sebastien Bourdeauducq 2012-03-06 14:18:22 +01:00
parent 2c375e900f
commit 7230508e7c

View file

@ -34,6 +34,8 @@ def trace_back(name=None):
obj = frame.f_locals["self"]
except KeyError:
obj = None
if obj is not None and hasattr(obj, "__del__"):
obj = None
if obj is None:
modules = frame.f_globals["__name__"]
modules = modules.split(".")