[New-bugs-announce] [issue26099] site ignores ImportError when running sitecustomize and usercustomize

STINNER Victor report at bugs.python.org
Wed Jan 13 09:46:44 EST 2016


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 <report at bugs.python.org>
<http://bugs.python.org/issue26099>
_______________________________________


More information about the New-bugs-announce mailing list