summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-19 00:10:28 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-19 00:10:28 (GMT)
commitc6fe983b3b99b0c67e3c260dd2add8483f245ea8 (patch)
tree4db5cec99cab1b070133078dfc611fcb43dda6a1
parente2b70bcf7401477936fba99a8bf4a1f759ecc8a3 (diff)
downloadcpython-c6fe983b3b99b0c67e3c260dd2add8483f245ea8.zip
cpython-c6fe983b3b99b0c67e3c260dd2add8483f245ea8.tar.gz
cpython-c6fe983b3b99b0c67e3c260dd2add8483f245ea8.tar.bz2
When sitecustomize.py fails, don't make all of site.py fail,
unless PYTHONVERBOSE is set.
-rw-r--r--Lib/site.py7
1 files changed, 7 insertions, 0 deletions
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 @@ 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():