From 1c4e98425a5a7923da36e99e7818070142963f1b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 23 Nov 2021 17:34:14 +0100 Subject: Make the linter happier --- libmat2/archive.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libmat2/archive.py') 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 -- cgit v1.3