[Python-checkins] bpo-43950: check against the raw string, not the pyobject (GH-27337)

isidentical webhook-mailer at python.org
Sat Jul 24 13:49:36 EDT 2021


https://github.com/python/cpython/commit/ef8b8535cb3cd705392af9b927d6ff336d98427d
commit: ef8b8535cb3cd705392af9b927d6ff336d98427d
branch: main
author: Batuhan Taskaya <batuhan at python.org>
committer: isidentical <isidentical at gmail.com>
date: 2021-07-24T20:49:17+03:00
summary:

bpo-43950: check against the raw string, not the pyobject (GH-27337)

files:
M Python/traceback.c

diff --git a/Python/traceback.c b/Python/traceback.c
index 9418236abbf51..61e6838e17e41 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -605,7 +605,7 @@ extract_anchors_from_line(PyObject *filename, PyObject *line,
     }
 
     const char *segment_str = PyUnicode_AsUTF8(segment);
-    if (!segment) {
+    if (!segment_str) {
         goto done;
     }
 



More information about the Python-checkins mailing list