mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Do the absolute minimal amount of modifications to eradicate
Py_FatalError() from module initialization functions. The importing mechanism already checks for PyErr_Occurred() after module importation and it Does The Right Thing. Unfortunately, the following either were not compiled or tested by the regression suite, due to issues with my development platform: almodule.c cdmodule.c mpzmodule.c puremodule.c timingmodule.c
This commit is contained in:
parent
72dacb8026
commit
9bfd2bf5ed
15 changed files with 31 additions and 67 deletions
|
@ -2862,11 +2862,10 @@ initparser(void)
|
|||
parser_error = PyErr_NewException("parser.ParserError", NULL, NULL);
|
||||
|
||||
if ((parser_error == 0)
|
||||
|| (PyDict_SetItemString(dict, "ParserError", parser_error) != 0)) {
|
||||
/*
|
||||
* This is serious.
|
||||
*/
|
||||
Py_FatalError("can't define parser.ParserError");
|
||||
|| (PyDict_SetItemString(dict, "ParserError", parser_error) != 0))
|
||||
{
|
||||
/* caller will check PyErr_Occurred() */
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* Nice to have, but don't cry if we fail.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue