Antoine Pitrou <pit...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue2920>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to