From b8a6ee325671e3bc5c4516765cccb0fc34d18f9d Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Thu, 2 Jan 2020 10:41:15 +0100 Subject: [PATCH] Unpack files with any kind of supported compression, not just gzip --- hifi_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hifi_utils.py b/hifi_utils.py index 24e43dc83c..d117011c99 100644 --- a/hifi_utils.py +++ b/hifi_utils.py @@ -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)