diff options
| author | jvoisin | 2021-12-13 19:44:44 +0100 |
|---|---|---|
| committer | jvoisin | 2021-12-13 19:44:44 +0100 |
| commit | 01b39aa68c876ecad1b20277ebc65dfd6b932f1f (patch) | |
| tree | 413d614977aad27c5f87170011c007352d91dea2 /libmat2/archive.py | |
| parent | e312868c4edab227b772f4795e8adff96da4bf4d (diff) | |
Make libmat2 more robust against corrupted zip files
Diffstat (limited to 'libmat2/archive.py')
| -rw-r--r-- | libmat2/archive.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmat2/archive.py b/libmat2/archive.py index cfc9671..ec44ebd 100644 --- a/libmat2/archive.py +++ b/libmat2/archive.py | |||
| @@ -388,7 +388,7 @@ class ZipParser(ArchiveBasedAbstractParser): | |||
| 388 | try: | 388 | try: |
| 389 | with zipfile.ZipFile(self.filename): | 389 | with zipfile.ZipFile(self.filename): |
| 390 | pass | 390 | pass |
| 391 | except zipfile.BadZipFile: | 391 | except (zipfile.BadZipFile, OSError): |
| 392 | raise ValueError | 392 | raise ValueError |
| 393 | 393 | ||
| 394 | @staticmethod | 394 | @staticmethod |
