summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-03-14 13:40:58 (GMT)
committerGitHub <noreply@github.com>2020-03-14 13:40:58 (GMT)
commit57c781048915e45d15eaa348c51ec01b12cc170a (patch)
treebec97d13da94ac84f56951b0078be2ba0565d2cc /Python
parentfaf626b8cc6dd5c952f3fa33b09ae521388479cd (diff)
downloadcpython-57c781048915e45d15eaa348c51ec01b12cc170a.zip
cpython-57c781048915e45d15eaa348c51ec01b12cc170a.tar.gz
cpython-57c781048915e45d15eaa348c51ec01b12cc170a.tar.bz2
bpo-39585: Delete a pending comment in _warning.c (GH-18414)
Diffstat (limited to 'Python')
-rw-r--r--Python/_warnings.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 39f8033..834ceb1 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) {