From 47766736fcb6b9432caaafb10962c6a050d4bce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 20 Oct 2013 12:45:05 +0200 Subject: [PATCH] daca2: handle xz compression --- tools/daca2.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/daca2.py b/tools/daca2.py index ac9684de3..fd0666d7a 100644 --- a/tools/daca2.py +++ b/tools/daca2.py @@ -19,6 +19,7 @@ import time FTPSERVER = 'ftp.sunet.se' FTPPATH = '/pub/Linux/distributions/Debian/debian/pool/main/' + def getpackages(folder): print('Connect') f = ftplib.FTP(FTPSERVER) @@ -133,6 +134,8 @@ def scanarchive(fullpath): subprocess.call(['wget', fullpath]) if filename[-3:] == '.gz': subprocess.call(['tar', 'xzvf', filename]) + elif filename[-3:] == '.xz': + subprocess.call(['tar', 'xJvf', filename]) elif filename[-4:] == '.bz2': subprocess.call(['tar', 'xjvf', filename])