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 Alexander.Belopolsky
Recipients Alexander.Belopolsky, alexandre.vassalotti, amaury.forgeotdarc, belopolsky, pitrou, ygingras
Date 2010-05-28.12:38:37
SpamBayes Score 4.3412856e-06
Marked as misclassified No
Message-id <E118D98E-9187-482B-B5B2-E8AA9B8A1888@gmail.com>
In-reply-to <1275049653.85.0.964764925879.issue2920@psf.upfronthosting.co.za>
Content
The patch already checks for failed import and falls back to printing  
numerical error code. However, I don't like the import either. I will  
think about the alternatives.

On May 28, 2010, at 8:27 AM, Antoine Pitrou <report@bugs.python.org>  
wrote:

>
> Antoine Pitrou <pitrou@free.fr> added the comment:
>
> Agreed with Amaury. Module import could fail for various reasons  
> (perhaps the same ones which led to the exception being raised!), or  
> could deadlock if the import lock is being held. Also, having  
> __str__ fail is usually very annoying for users (especially when  
> it's the __str__ of an exception object).
>
> If it's too hard to import errno at startup (because of  
> bootstrapping), I would suggest using PyImport_ImportModuleNoBlock()  
> instead, and silence errors (just print the numeric value of errno  
> instead).
>
> ----------
> nosy: +pitrou
> versions: +Python 2.7, Python 3.1, Python 3.2
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue2920>
> _______________________________________
History
Date User Action Args
2010-05-28 12:38:39Alexander.Belopolskysetrecipients: + Alexander.Belopolsky, amaury.forgeotdarc, belopolsky, pitrou, alexandre.vassalotti, ygingras
2010-05-28 12:38:37Alexander.Belopolskylinkissue2920 messages
2010-05-28 12:38:37Alexander.Belopolskycreate