mirror of https://github.com/python/cpython
When sitecustomize.py fails, don't make all of site.py fail,
unless PYTHONVERBOSE is set.
This commit is contained in:
parent
e2b70bcf74
commit
c6fe983b3b
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue