]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-142724: fix error path in `_PyPegen_raise_tokenizer_init_error` (GH-142725...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 14 Dec 2025 22:35:54 +0000 (23:35 +0100)
committerGitHub <noreply@github.com>
Sun, 14 Dec 2025 22:35:54 +0000 (22:35 +0000)
Co-authored-by: AZero13 <gfunni234@gmail.com>
Parser/pegen_errors.c

index d692d6b0c86446f94a57fdc1cc1704267ed5fe31..b5e7b12b93c089b7e5bf0145e7f07e05b0938cca 100644 (file)
@@ -35,7 +35,7 @@ _PyPegen_raise_tokenizer_init_error(PyObject *filename)
 
     tuple = PyTuple_Pack(2, errstr, tmp);
     Py_DECREF(tmp);
-    if (!value) {
+    if (!tuple) {
         goto error;
     }
     PyErr_SetObject(PyExc_SyntaxError, tuple);