Unpack files with any kind of supported compression, not just gzip

This commit is contained in:
Dale Glass 2020-01-02 10:41:15 +01:00
parent 7abb8347ca
commit b8a6ee3256

View file

@ -118,6 +118,6 @@ def downloadAndExtract(url, destPath, hash=None, hasher=hashlib.sha512(), isZip=
zip.extractall(destPath)
else:
# Extract the archive
with tarfile.open(tempFileName, 'r:gz') as tgz:
with tarfile.open(tempFileName, 'r:*') as tgz:
tgz.extractall(destPath)
os.remove(tempFileName)