From: Hai Shi Date: Sat, 14 Mar 2020 13:40:58 +0000 (+0800) Subject: bpo-39585: Delete a pending comment in _warning.c (GH-18414) X-Git-Tag: v3.9.0a5~68 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=57c781048915e45d15eaa348c51ec01b12cc170a;p=thirdparty%2FPython%2Fcpython.git bpo-39585: Delete a pending comment in _warning.c (GH-18414) --- diff --git a/Python/_warnings.c b/Python/_warnings.c index 39f8033cd906..834ceb184594 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -491,8 +491,9 @@ show_warning(PyObject *filename, int lineno, PyObject *text, PyOS_snprintf(lineno_str, sizeof(lineno_str), ":%d: ", lineno); name = _PyObject_GetAttrId(category, &PyId___name__); - if (name == NULL) /* XXX Can an object lack a '__name__' attribute? */ + if (name == NULL) { goto error; + } f_stderr = _PySys_GetObjectId(&PyId_stderr); if (f_stderr == NULL) {