diff options
author | jvoisin <julien.voisin@dustri.org> | 2021-11-23 17:34:14 +0100 |
---|---|---|
committer | jvoisin <julien.voisin@dustri.org> | 2021-11-23 17:34:14 +0100 |
commit | 1c4e98425a5a7923da36e99e7818070142963f1b (patch) | |
tree | 0cf12f9ffd134a83a3807adf00e6d7f591da76f1 | |
parent | fb7440ab5ddaffe52d1f765c59fecd2c0e3aa944 (diff) | |
download | external_mat2-1c4e98425a5a7923da36e99e7818070142963f1b.tar.gz external_mat2-1c4e98425a5a7923da36e99e7818070142963f1b.tar.bz2 external_mat2-1c4e98425a5a7923da36e99e7818070142963f1b.zip |
Make the linter happier
-rw-r--r-- | libmat2/archive.py | 3 | ||||
-rwxr-xr-x | mat2 | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libmat2/archive.py b/libmat2/archive.py index f6db491..48c1594 100644 --- a/libmat2/archive.py +++ b/libmat2/archive.py @@ -372,7 +372,8 @@ class ZipParser(ArchiveBasedAbstractParser): def is_archive_valid(self): try: - zipfile.ZipFile(self.filename) + with zipfile.ZipFile(self.filename): + pass except zipfile.BadZipFile: raise ValueError @@ -13,8 +13,8 @@ import concurrent.futures try: from libmat2 import parser_factory, UNSUPPORTED_EXTENSIONS from libmat2 import check_dependencies, UnknownMemberPolicy -except ValueError as e: - print(e) +except ValueError as ex: + print(ex) sys.exit(1) __version__ = '0.12.2' |