commit | c6fe983b3b99b0c67e3c260dd2add8483f245ea8 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Sat Aug 19 00:10:28 2006 +0000 |
committer | Guido van Rossum <guido@python.org> | Sat Aug 19 00:10:28 2006 +0000 |
tree | 4db5cec99cab1b070133078dfc611fcb43dda6a1 | |
parent | e2b70bcf7401477936fba99a8bf4a1f759ecc8a3 [diff] |
When sitecustomize.py fails, don't make all of site.py fail, unless PYTHONVERBOSE is set.
diff --git a/Lib/site.py b/Lib/site.py index 01086b7..da7bfaa 100644 --- a/Lib/site.py +++ b/Lib/site.py
@@ -385,6 +385,13 @@ 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():