From: Victor Stinner Date: Mon, 18 Nov 2019 16:40:07 +0000 (+0100) Subject: bpo-38631: Avoid Py_FatalError() in _multibytecodec init (GH-17233) X-Git-Tag: v3.9.0a1~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc7d3aa6d74b718699b7a6bced9b0dfdfbf95c13;p=thirdparty%2FPython%2Fcpython.git bpo-38631: Avoid Py_FatalError() in _multibytecodec init (GH-17233) 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(). --- diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 56d007607e21..f24ec933508f 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -2085,7 +2085,6 @@ PyInit__multibytecodec(void) } if (PyErr_Occurred()) { - Py_FatalError("can't initialize the _multibytecodec module"); Py_DECREF(m); m = NULL; }