use py.builtin.exec_

This commit is contained in:
Benjamin Peterson 2011-05-24 18:28:05 -05:00
parent 0bb84abca7
commit fa412675fc
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ def getmsg(f, extra_ns=None, must_pass=False):
ns = {}
if extra_ns is not None:
ns.update(extra_ns)
exec code in ns
py.builtin.exec_(code, ns)
func = ns[f.__name__]
try:
func()