mirror of
https://github.com/python/cpython.git
synced 2026-01-26 21:03:34 +00:00
gh-140550: Correct error message for PyModExport (PEP 793) hook (GH-142583)
This commit is contained in:
parent
340a684674
commit
15313dd3d7
@ -2003,7 +2003,7 @@ import_run_modexport(PyThreadState *tstate, PyModExportFunction ex0,
|
||||
if (!PyErr_Occurred()) {
|
||||
PyErr_Format(
|
||||
PyExc_SystemError,
|
||||
"slot export function for module %s failed without setting an exception",
|
||||
"module export hook for module %R failed without setting an exception",
|
||||
info->name);
|
||||
}
|
||||
return NULL;
|
||||
@ -2011,7 +2011,7 @@ import_run_modexport(PyThreadState *tstate, PyModExportFunction ex0,
|
||||
if (PyErr_Occurred()) {
|
||||
PyErr_Format(
|
||||
PyExc_SystemError,
|
||||
"slot export function for module %s raised unreported exception",
|
||||
"module export hook for module %R raised unreported exception",
|
||||
info->name);
|
||||
}
|
||||
PyObject *result = PyModule_FromSlotsAndSpec(slots, spec);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user