diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-07-21 20:26:27 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-07-21 20:26:27 (GMT) |
commit | 33113a3504c8ae2567b18fe39d283f985f01defe (patch) | |
tree | 9d1a45054bb04db63b4e02d3bb0edb396eaa970f /Python/traceback.c | |
parent | 71945880fb2024a61eb6dc328c4094a293a7f802 (diff) | |
parent | 04b01dc8f78ee8a549e6011ee26d8de5cc6184c4 (diff) | |
download | cpython-33113a3504c8ae2567b18fe39d283f985f01defe.zip cpython-33113a3504c8ae2567b18fe39d283f985f01defe.tar.gz cpython-33113a3504c8ae2567b18fe39d283f985f01defe.tar.bz2 |
merge 3.3
Diffstat (limited to 'Python/traceback.c')
-rw-r--r-- | Python/traceback.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/traceback.c b/Python/traceback.c index 3101580..8195d40 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -260,7 +260,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent) if (fd < 0) { Py_DECREF(io); Py_DECREF(binary); - return NULL; + return 0; } found_encoding = PyTokenizer_FindEncodingFilename(fd, filename); encoding = (found_encoding != NULL) ? found_encoding : "utf-8"; @@ -269,7 +269,7 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent) Py_DECREF(io); Py_DECREF(binary); PyMem_FREE(found_encoding); - return PyErr_SetFromErrnoWithFilenameObject(PyExc_IOError, filename); + return 0; } fob = _PyObject_CallMethodId(io, &PyId_TextIOWrapper, "Os", binary, encoding); Py_DECREF(io); |