Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r47203:b96796f0767d Date: 2011-09-11 15:49 +0200 http://bitbucket.org/pypy/pypy/changeset/b96796f0767d/
Log: 'honor__builtins__' is generally False, but just in case, be safe against corner cases in which w_globals is None. diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py --- a/pypy/interpreter/pyframe.py +++ b/pypy/interpreter/pyframe.py @@ -66,7 +66,7 @@ make_sure_not_resized(self.locals_stack_w) check_nonneg(self.nlocals) # - if space.config.objspace.honor__builtins__: + if space.config.objspace.honor__builtins__ and w_globals is not None: self.builtin = space.builtin.pick_builtin(w_globals) # regular functions always have CO_OPTIMIZED and CO_NEWLOCALS. # class bodies only have CO_NEWLOCALS. _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit