You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpo-1559549: ImportError needs attributes for module and file name
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2011-03-01.06:35:45.408>created_at=<Date2011-02-28.22:30:43.852>labels= ['interpreter-core', 'type-feature']
title='Include module name on ImportError'updated_at=<Date2011-03-01.06:35:45.406>user='https://github.com/ncoghlan'
Catching ImportError in order to switch to an alternate implementation can mask real failures in imported modules. Attaching the module name as an attribute would allow this to be handled correctly by doing something like:
try:
import simplejson
except ImportError as err:
if err.module_name != 'simplejson':
raise
<backup plan>
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: