Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 33113a3

Browse files
committed
merge 3.3
2 parents 7194588 + 04b01dc commit 33113a3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/traceback.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent)
260260
if (fd < 0) {
261261
Py_DECREF(io);
262262
Py_DECREF(binary);
263-
return NULL;
263+
return 0;
264264
}
265265
found_encoding = PyTokenizer_FindEncodingFilename(fd, filename);
266266
encoding = (found_encoding != NULL) ? found_encoding : "utf-8";
@@ -269,7 +269,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent)
269269
Py_DECREF(io);
270270
Py_DECREF(binary);
271271
PyMem_FREE(found_encoding);
272-
return PyErr_SetFromErrnoWithFilenameObject(PyExc_IOError, filename);
272+
return 0;
273273
}
274274
fob = _PyObject_CallMethodId(io, &PyId_TextIOWrapper, "Os", binary, encoding);
275275
Py_DECREF(io);

0 commit comments

Comments
 (0)