Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 165b128 commit bd206e2Copy full SHA for bd206e2
1 file changed
Modules/zipimport.c
@@ -736,7 +736,8 @@ read_directory(PyObject *archive_obj)
736
737
fp = _Py_fopen(archive_obj, "rb");
738
if (fp == NULL) {
739
- PyErr_Format(ZipImportError, "can't open Zip file: '%U'", archive_obj);
+ if (!PyErr_Occurred())
740
+ PyErr_Format(ZipImportError, "can't open Zip file: '%U'", archive_obj);
741
return NULL;
742
}
743
fseek(fp, -22, SEEK_END);
@@ -909,8 +910,9 @@ get_data(PyObject *archive, PyObject *toc_entry)
909
910
911
fp = _Py_fopen(archive, "rb");
912
if (!fp) {
- PyErr_Format(PyExc_IOError,
913
- "zipimport: can not open file %U", archive);
914
+ PyErr_Format(PyExc_IOError,
915
+ "zipimport: can not open file %U", archive);
916
917
918
0 commit comments