[pypy-svn] r12059 - pypy/dist/pypy/module/sys2
arigo at codespeak.net
arigo at codespeak.net
Sun May 8 08:06:29 CEST 2005
Author: arigo
Date: Sun May 8 08:06:28 2005
New Revision: 12059
Modified:
pypy/dist/pypy/module/sys2/state.py
Log:
Don't let faked modules get in our builtin_modules if we see a Python
reimplementation in pypy/lib/. (Quick hack for now.)
Modified: pypy/dist/pypy/module/sys2/state.py
==============================================================================
--- pypy/dist/pypy/module/sys2/state.py (original)
+++ pypy/dist/pypy/module/sys2/state.py Sun May 8 08:06:28 2005
@@ -1,6 +1,7 @@
"""
Implementation of interpreter-level 'sys' routines.
"""
+import pypy
#from pypy.interpreter.module import Module
from pypy.interpreter.error import OperationError
@@ -29,7 +30,9 @@
'unicodedata',
'parser', 'fcntl', #'_codecs', 'binascii'
]:
- if fn not in builtin_modules:
+ if fn not in builtin_modules and not os.path.exists(
+ os.path.join(os.path.dirname(pypy.__file__),
+ 'lib', fn+'.py')):
try:
builtin_modules[fn] = hack_cpython_module(fn)
except ImportError:
More information about the Pypy-commit
mailing list