Skip to content

Commit ca4a227

Browse files
authored
Fix BadGzipFile import (#203)
1 parent 71ae636 commit ca4a227

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

inspector/distribution.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import gzip
12
import tarfile
23
import zipfile
34
import zlib
@@ -46,7 +47,7 @@ def __init__(self, f):
4647
f.seek(0)
4748
try:
4849
self.tarfile = tarfile.open(fileobj=f, mode="r:gz")
49-
except tarfile.BadGzipFile:
50+
except gzip.BadGzipFile:
5051
raise BadFileError("Bad gzip file")
5152

5253
def namelist(self):

0 commit comments

Comments
 (0)