When sitecustomize.py fails, don't make all of site.py fail,

unless PYTHONVERBOSE is set.
This commit is contained in:
Guido van Rossum 2006-08-19 00:10:28 +00:00
parent e2b70bcf74
commit c6fe983b3b
1 changed files with 7 additions and 0 deletions

View File

@ -385,6 +385,13 @@ def execsitecustomize():
import sitecustomize
except ImportError:
pass
except Exception, err:
if os.environ.get("PYTHONVERBOSE"):
raise
sys.stderr.write(
"Error in sitecustomize; set PYTHONVERBOSE for traceback:\n"
"%s: %s\n" %
(err.__class__.__name__, err))
def main():