mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix deprecation warning from tarfile.extractall()
This commit is contained in:
parent
11ad5a1a6e
commit
d37f436c4c
@ -72,7 +72,10 @@ def extract_dicts(cache_path):
|
|||||||
buf.seek(0)
|
buf.seek(0)
|
||||||
tf = tarfile.TarFile(fileobj=buf)
|
tf = tarfile.TarFile(fileobj=buf)
|
||||||
with tf:
|
with tf:
|
||||||
tf.extractall(tdir)
|
try:
|
||||||
|
tf.extractall(tdir, filter='data')
|
||||||
|
except TypeError:
|
||||||
|
tf.extractall(tdir)
|
||||||
with open(os.path.join(tdir, 'sha1sum'), 'wb') as f:
|
with open(os.path.join(tdir, 'sha1sum'), 'wb') as f:
|
||||||
f.write(expected_hash())
|
f.write(expected_hash())
|
||||||
dest = os.path.join(cache_path, 'f')
|
dest = os.path.join(cache_path, 'f')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user