This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients ncoghlan
Date 2011-02-28.22:30:43
SpamBayes Score 0.0011281201
Marked as misclassified No
Message-id <1298932245.21.0.726100579882.issue11356@psf.upfronthosting.co.za>
In-reply-to
Content
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>

See http://mail.python.org/pipermail/python-ideas/2011-February/009209.html
History
Date User Action Args
2011-02-28 22:30:45ncoghlansetrecipients: + ncoghlan
2011-02-28 22:30:45ncoghlansetmessageid: <1298932245.21.0.726100579882.issue11356@psf.upfronthosting.co.za>
2011-02-28 22:30:43ncoghlanlinkissue11356 messages
2011-02-28 22:30:43ncoghlancreate