From: Sebastien Bourdeauducq Date: Fri, 20 Jan 2012 21:15:44 +0000 (+0100) Subject: Remove NoContext X-Git-Tag: 24jan2021_ls180~2099^2~1066 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=904d14d4cf5ec9a1051574ef29a273b846eb128f;p=litex.git Remove NoContext --- diff --git a/migen/fhdl/namer.py b/migen/fhdl/namer.py index d5995f97..ff2a85d3 100644 --- a/migen/fhdl/namer.py +++ b/migen/fhdl/namer.py @@ -2,9 +2,6 @@ import inspect import re from itertools import combinations -class NoContext: - pass - def trace_back(name=None): l = [] frame = inspect.currentframe().f_back.f_back @@ -13,7 +10,7 @@ def trace_back(name=None): obj = frame.f_locals["self"] except KeyError: obj = None - if obj is None or isinstance(obj, NoContext): + if obj is None: modules = frame.f_globals["__name__"] modules = modules.split(".") obj = modules[len(modules)-1]