Skip to content

Commit 15313dd

Browse files
authored
gh-140550: Correct error message for PyModExport (PEP 793) hook (GH-142583)
1 parent 340a684 commit 15313dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/import.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,15 +2003,15 @@ import_run_modexport(PyThreadState *tstate, PyModExportFunction ex0,
20032003
if (!PyErr_Occurred()) {
20042004
PyErr_Format(
20052005
PyExc_SystemError,
2006-
"slot export function for module %s failed without setting an exception",
2006+
"module export hook for module %R failed without setting an exception",
20072007
info->name);
20082008
}
20092009
return NULL;
20102010
}
20112011
if (PyErr_Occurred()) {
20122012
PyErr_Format(
20132013
PyExc_SystemError,
2014-
"slot export function for module %s raised unreported exception",
2014+
"module export hook for module %R raised unreported exception",
20152015
info->name);
20162016
}
20172017
PyObject *result = PyModule_FromSlotsAndSpec(slots, spec);

0 commit comments

Comments
 (0)