]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39585: Delete a pending comment in _warning.c (GH-18414)
authorHai Shi <shihai1992@gmail.com>
Sat, 14 Mar 2020 13:40:58 +0000 (21:40 +0800)
committerGitHub <noreply@github.com>
Sat, 14 Mar 2020 13:40:58 +0000 (15:40 +0200)
Python/_warnings.c

index 39f8033cd906a6cacc973955645b2e28de5e9588..834ceb18459469e4dbc0e06c9466f62dea367713 100644 (file)
@@ -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) {