[issue15110] strange Tracebacks with importlib

Amaury Forgeot d'Arc report at bugs.python.org
Sat Jul 7 23:15:12 CEST 2012


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

I added to _ssl.c:

    PyErr_SetString(PyExc_ValueError, "Just a test");
    return NULL;

Then I tried to import the module:

~/python/cpython3.x$ ./python -c "import ssl"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/amauryfa/python/cpython3.x/Lib/ssl.py", line 60, in <module>
    import _ssl             # if we can't import it, let the error propagate
  File "<frozen importlib._bootstrap>", line 1300, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1267, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 432, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 347, in set_package_wrapper
  File "<frozen importlib._bootstrap>", line 360, in set_loader_wrapper
  File "<frozen importlib._bootstrap>", line 878, in load_module
ValueError: Just a test

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15110>
_______________________________________


More information about the Python-bugs-list mailing list