diff --git a/Lib/site.py b/Lib/site.py index 01086b7e2ae..da7bfaab21f 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():