fhdl/namer: do not reference objects with __del__ methods to avoid uncollectable...
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 6 Mar 2012 13:18:22 +0000 (14:18 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 6 Mar 2012 13:18:22 +0000 (14:18 +0100)
migen/fhdl/namer.py

index 070d4ba7e3a16ee08e5f026552bf2645a13093eb..c2ef318ccfc516c34c5fde4842b1f13806ff5202 100644 (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(".")