projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05b20d4
)
Remove NoContext
author
Sebastien Bourdeauducq
<sebastien@milkymist.org>
Fri, 20 Jan 2012 21:15:44 +0000
(22:15 +0100)
committer
Sebastien Bourdeauducq
<sebastien@milkymist.org>
Fri, 20 Jan 2012 21:15:44 +0000
(22:15 +0100)
migen/fhdl/namer.py
patch
|
blob
|
history
diff --git
a/migen/fhdl/namer.py
b/migen/fhdl/namer.py
index d5995f97f438b5dc7e33964b9d3a1e13e59a89a0..ff2a85d37c2750a4403ed40d88d94994923784fd 100644
(file)
--- 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]