diff options
author | Georg Brandl <georg@python.org> | 2006-02-19 09:38:58 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-02-19 09:38:58 (GMT) |
commit | e9b1949f70ff985e17e1ce5592b59073d101bbab (patch) | |
tree | 5273a5694480c8a0f9d749f31c7908428e96fe5f /Modules | |
parent | 2a8ec996ce8c8f941204218fcc4076a0ffb50360 (diff) | |
download | cpython-e9b1949f70ff985e17e1ce5592b59073d101bbab.zip cpython-e9b1949f70ff985e17e1ce5592b59073d101bbab.tar.gz cpython-e9b1949f70ff985e17e1ce5592b59073d101bbab.tar.bz2 |
Patch #1352711: make zipimport raise a complete IOError
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/zipimport.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c index 373255d..fa4380c 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); |