mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Fix #920
This commit is contained in:
parent
5c8c683c2f
commit
92b6543433
@ -216,7 +216,10 @@ cd $frozen_path
|
|||||||
|
|
||||||
def extract_tarball(tar, destdir):
|
def extract_tarball(tar, destdir):
|
||||||
if hasattr(tar, 'read'):
|
if hasattr(tar, 'read'):
|
||||||
|
try:
|
||||||
tarfile.open(fileobj=tar, mode='r').extractall(destdir)
|
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:
|
else:
|
||||||
tarfile.open(tar, 'r').extractall(destdir)
|
tarfile.open(tar, 'r').extractall(destdir)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user