mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue