diff options
author | Phillip J. Eby <pje@telecommunity.com> | 2006-04-11 01:07:43 (GMT) |
---|---|---|
committer | Phillip J. Eby <pje@telecommunity.com> | 2006-04-11 01:07:43 (GMT) |
commit | 470321108019367e3bdd96309e89d79f04784d45 (patch) | |
tree | 67bb4c26a4a2e14eef1999eed390091620a850fa /Lib/site.py | |
parent | 7731dfdaad96c519d80823782ca4c81d09466e8d (diff) | |
download | cpython-470321108019367e3bdd96309e89d79f04784d45.zip cpython-470321108019367e3bdd96309e89d79f04784d45.tar.gz cpython-470321108019367e3bdd96309e89d79f04784d45.tar.bz2 |
Updated the warnings, linecache, inspect, traceback, site, and doctest modules
to work correctly with modules imported from zipfiles or via other PEP 302
__loader__ objects. Tests and doc updates are included.
Diffstat (limited to 'Lib/site.py')
-rw-r--r-- | Lib/site.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/site.py b/Lib/site.py index 6818e85..8074979 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -69,6 +69,8 @@ def makepath(*paths): def abs__file__(): """Set all module' __file__ attribute to an absolute path""" for m in sys.modules.values(): + if hasattr(m,'__loader__'): + continue # don't mess with a PEP 302-supplied __file__ try: m.__file__ = os.path.abspath(m.__file__) except AttributeError: |