New submission from STINNER Victor:

If the code of sitecustomize raises an ImportError because the requested module 
doesn't exist, sitecustomize exception is silently ignored because site.py uses 
"try: import sitecustomize except ImportError: pass".

It's possible to log a warning since ImportError now has a name attribute since 
Python 3.3.

There is a similar issue on usercustomize.

Attached patch fixes the issue.

----------
files: site.patch
keywords: patch
messages: 258144
nosy: haypo
priority: normal
severity: normal
status: open
title: site ignores ImportError when running sitecustomize and usercustomize
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41603/site.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26099>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to