Commit e9b1949f authored by Georg Brandl's avatar Georg Brandl

Patch #1352711: make zipimport raise a complete IOError

parent 2a8ec996
...@@ -434,8 +434,7 @@ zipimporter_get_data(PyObject *obj, PyObject *args) ...@@ -434,8 +434,7 @@ zipimporter_get_data(PyObject *obj, PyObject *args)
toc_entry = PyDict_GetItemString(self->files, path); toc_entry = PyDict_GetItemString(self->files, path);
if (toc_entry == NULL) { if (toc_entry == NULL) {
PyErr_Format(PyExc_IOError, "file not found [%.200s]", PyErr_SetFromErrnoWithFilename(PyExc_IOError, path);
path);
return NULL; return NULL;
} }
return get_data(PyString_AsString(self->archive), toc_entry); return get_data(PyString_AsString(self->archive), toc_entry);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment