This commit is contained in:
Kovid Goyal 2008-07-31 14:59:31 -07:00
parent 5c8c683c2f
commit 92b6543433

View File

@ -216,7 +216,10 @@ cd $frozen_path
def extract_tarball(tar, destdir):
if hasattr(tar, 'read'):
tarfile.open(fileobj=tar, mode='r').extractall(destdir)
try:
tarfile.open(fileobj=tar, mode='r').extractall(destdir)
except: # tarfile.py on Fedora 9 is buggy
subprocess.check_call(['tar', 'xvjf', tar.name, destdir])
else:
tarfile.open(tar, 'r').extractall(destdir)