Author: guido.van.rossum
Date: Sat Aug 19 02:10:28 2006
New Revision: 51394

Modified:
   python/branches/p3yk/Lib/site.py
Log:
When sitecustomize.py fails, don't make all of site.py fail,
unless PYTHONVERBOSE is set.


Modified: python/branches/p3yk/Lib/site.py
==============================================================================
--- python/branches/p3yk/Lib/site.py    (original)
+++ python/branches/p3yk/Lib/site.py    Sat Aug 19 02:10:28 2006
@@ -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():
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to