summaryrefslogtreecommitdiffstats
path: root/Modules/parsermodule.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-09-01 09:01:32 (GMT)
committerBarry Warsaw <barry@python.org>2000-09-01 09:01:32 (GMT)
commit9bfd2bf5ede8e5d58775180d6867d81ddcdd3594 (patch)
treecd3adf2b98bc2c0b94980df1953ae9709f46cc28 /Modules/parsermodule.c
parent72dacb80262b73a833802c0b0e5941b8cdb1d79c (diff)
downloadcpython-9bfd2bf5ede8e5d58775180d6867d81ddcdd3594.zip
cpython-9bfd2bf5ede8e5d58775180d6867d81ddcdd3594.tar.gz
cpython-9bfd2bf5ede8e5d58775180d6867d81ddcdd3594.tar.bz2
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
Diffstat (limited to 'Modules/parsermodule.c')
-rw-r--r--Modules/parsermodule.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index d946608..056d2bb 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -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.