projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a8ec99
)
Patch #1352711: make zipimport raise a complete IOError
author
Georg Brandl
<georg@python.org>
Sun, 19 Feb 2006 09:38:58 +0000
(09:38 +0000)
committer
Georg Brandl
<georg@python.org>
Sun, 19 Feb 2006 09:38:58 +0000
(09:38 +0000)
Modules/zipimport.c
patch
|
blob
|
history
diff --git
a/Modules/zipimport.c
b/Modules/zipimport.c
index 373255d5b81ed92cbddb0b0f2ab9c4f7b5eb0bc1..fa4380c0884fd303e0824a059984d9437f0f4338 100644
(file)
--- 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);