From: Sebastien Bourdeauducq Date: Tue, 6 Mar 2012 13:18:22 +0000 (+0100) Subject: fhdl/namer: do not reference objects with __del__ methods to avoid uncollectable... X-Git-Tag: 24jan2021_ls180~2099^2~996 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7230508e7cbcc783c302de1f0a05405d20487a29;p=litex.git fhdl/namer: do not reference objects with __del__ methods to avoid uncollectable cycles --- diff --git a/migen/fhdl/namer.py b/migen/fhdl/namer.py index 070d4ba7..c2ef318c 100644 --- a/migen/fhdl/namer.py +++ b/migen/fhdl/namer.py @@ -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(".")