]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38631: Avoid Py_FatalError() in _multibytecodec init (GH-17233)
authorVictor Stinner <vstinner@python.org>
Mon, 18 Nov 2019 16:40:07 +0000 (17:40 +0100)
committerGitHub <noreply@github.com>
Mon, 18 Nov 2019 16:40:07 +0000 (17:40 +0100)
If an exception is raised and PyInit__multibytecodec() returns NULL,
Python reports properly the exception to the user. There is no need
to crash Python with Py_FatalError().

Modules/cjkcodecs/multibytecodec.c

index 56d007607e2183c4c1e474a7ff6ab3fafe7d554d..f24ec933508f14677a59c451b52fea7612cfe252 100644 (file)
@@ -2085,7 +2085,6 @@ PyInit__multibytecodec(void)
     }
 
     if (PyErr_Occurred()) {
-        Py_FatalError("can't initialize the _multibytecodec module");
         Py_DECREF(m);
         m = NULL;
     }