From: Georg Brandl Date: Sun, 19 Feb 2006 09:38:58 +0000 (+0000) Subject: Patch #1352711: make zipimport raise a complete IOError X-Git-Tag: v2.5a0~598 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e9b1949f70ff985e17e1ce5592b59073d101bbab;p=thirdparty%2FPython%2Fcpython.git Patch #1352711: make zipimport raise a complete IOError --- diff --git a/Modules/zipimport.c b/Modules/zipimport.c index 373255d5b81e..fa4380c0884f 100644 --- a/Modules/zipimport.c +++ b/Modules/zipimport.c @@ -434,8 +434,7 @@ zipimporter_get_data(PyObject *obj, PyObject *args) toc_entry = PyDict_GetItemString(self->files, path); if (toc_entry == NULL) { - PyErr_Format(PyExc_IOError, "file not found [%.200s]", - path); + PyErr_SetFromErrnoWithFilename(PyExc_IOError, path); return NULL; } return get_data(PyString_AsString(self->archive), toc_entry);