use py.builtin.exec_
This commit is contained in:
parent
0bb84abca7
commit
fa412675fc
|
@ -29,7 +29,7 @@ def getmsg(f, extra_ns=None, must_pass=False):
|
||||||
ns = {}
|
ns = {}
|
||||||
if extra_ns is not None:
|
if extra_ns is not None:
|
||||||
ns.update(extra_ns)
|
ns.update(extra_ns)
|
||||||
exec code in ns
|
py.builtin.exec_(code, ns)
|
||||||
func = ns[f.__name__]
|
func = ns[f.__name__]
|
||||||
try:
|
try:
|
||||||
func()
|
func()
|
||||||
|
|
Loading…
Reference in New Issue