Author: Maciej Fijalkowski <[email protected]>
Branch:
Changeset: r77172:a6ff037625b3
Date: 2015-05-07 12:22 +0200
http://bitbucket.org/pypy/pypy/changeset/a6ff037625b3/
Log: don't create debug object just because we used a local import
diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -1015,7 +1015,11 @@
if w_import is None:
raise OperationError(space.w_ImportError,
space.wrap("__import__ not found"))
- w_locals = self.getorcreatedebug().w_locals
+ d = self.getdebug()
+ if d is None:
+ w_locals = None
+ else:
+ w_locals = d.w_locals
if w_locals is None: # CPython does this
w_locals = space.w_None
w_modulename = space.wrap(modulename)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit