diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/zipimport.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c index 7473a8f..59046aa 100644 --- a/Modules/zipimport.c +++ b/Modules/zipimport.c @@ -907,10 +907,8 @@ read_directory(PyObject *archive) fp = _Py_fopen_obj(archive, "rb"); if (fp == NULL) { if (PyErr_ExceptionMatches(PyExc_OSError)) { - PyObject *exc, *val, *tb; - PyErr_Fetch(&exc, &val, &tb); - PyErr_Format(ZipImportError, "can't open Zip file: %R", archive); - _PyErr_ChainExceptions(exc, val, tb); + _PyErr_FormatFromCause(ZipImportError, + "can't open Zip file: %R", archive); } return NULL; } |