From 57a32a8615e25c817a6bf2a5dec66d69d773c826 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 10 Sep 2021 13:23:00 +0200 Subject: [PATCH] tools: idf_tools.py: add support for .tar.xz archives --- tools/idf_tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/idf_tools.py b/tools/idf_tools.py index b1bf848aed..f35c65074b 100755 --- a/tools/idf_tools.py +++ b/tools/idf_tools.py @@ -295,6 +295,8 @@ def unpack(filename, destination): # type: (str, str) -> None info('Extracting {0} to {1}'.format(filename, destination)) if filename.endswith(('.tar.gz', '.tgz')): archive_obj = tarfile.open(filename, 'r:gz') # type: Union[TarFile, ZipFile] + elif filename.endswith(('.tar.xz')): + archive_obj = tarfile.open(filename, 'r:xz') elif filename.endswith('zip'): archive_obj = ZipFile(filename) else: