mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Fix DownloadException
This commit is contained in:
parent
c5b1aa4aa5
commit
eb00284896
@ -144,18 +144,18 @@ def download_build_with_progress(url: str, path: Path) -> None:
|
|||||||
sys.stdout.write(f"\r[{eq_str}{space_str}] {percent}%")
|
sys.stdout.write(f"\r[{eq_str}{space_str}] {percent}%")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
break
|
break
|
||||||
except Exception:
|
except Exception as e:
|
||||||
if sys.stdout.isatty():
|
if sys.stdout.isatty():
|
||||||
sys.stdout.write("\n")
|
sys.stdout.write("\n")
|
||||||
if i + 1 < DOWNLOAD_RETRIES_COUNT:
|
|
||||||
time.sleep(3)
|
|
||||||
|
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
else:
|
|
||||||
raise DownloadException(
|
if i + 1 < DOWNLOAD_RETRIES_COUNT:
|
||||||
f"Cannot download dataset from {url}, all retries exceeded"
|
time.sleep(3)
|
||||||
)
|
else:
|
||||||
|
raise DownloadException(
|
||||||
|
f"Cannot download dataset from {url}, all retries exceeded"
|
||||||
|
) from e
|
||||||
|
|
||||||
if sys.stdout.isatty():
|
if sys.stdout.isatty():
|
||||||
sys.stdout.write("\n")
|
sys.stdout.write("\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user