mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix unneccessary re-downloads when re-vendoring
This commit is contained in:
parent
d148e2da5f
commit
1967b3e95d
@ -32,11 +32,11 @@ class ReVendor(Command):
|
||||
for i in range(num):
|
||||
try:
|
||||
raw = download_securely(url)
|
||||
except Exception:
|
||||
except Exception as err:
|
||||
if i == num - 1:
|
||||
raise
|
||||
self.info('Download failed, sleeping and retrying...')
|
||||
time.sleep(2)
|
||||
self.info(f'Download failed with error "{err}" sleeping and retrying...')
|
||||
time.sleep(2)
|
||||
with tarfile.open(fileobj=BytesIO(raw)) as tf:
|
||||
tf.extractall(tdir)
|
||||
if len(os.listdir(tdir)) == 1:
|
||||
|
Loading…
x
Reference in New Issue
Block a user