Skip to content

Commit

Permalink
fhdl/namer: do not reference objects with __del__ methods to avoid un…
Browse files Browse the repository at this point in the history
…collectable cycles
  • Loading branch information
Sebastien Bourdeauducq committed Mar 6, 2012
1 parent 2c375e9 commit 7230508
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions migen/fhdl/namer.py
Expand Up @@ -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(".")
Expand Down

0 comments on commit 7230508

Please sign in to comment.