diff options
| author | Georg Brandl <georg@python.org> | 2006-02-19 09:39:02 +0000 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2006-02-19 09:39:02 +0000 |
| commit | 465548111d1deb11c3ee2f67ea770fbecfea6640 (patch) | |
| tree | 59d2a45651f4c06d8b29763f55f58988aa6189a2 /Modules | |
| parent | 394e4af6d51e958788cd92debda76514a81a2678 (diff) | |
| download | cpython-git-465548111d1deb11c3ee2f67ea770fbecfea6640.tar.gz | |
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 e89005ace7..3a902cd729 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); |
