.
This commit is contained in:
parent
f99bd4e5c9
commit
a04ac2d857
16 changed files with 132 additions and 74 deletions
|
|
@ -186,7 +186,6 @@ def _download_and_extract(
|
|||
"""Download one survey zip and extract its ECW raster(s)."""
|
||||
url = f"{tile.uri}?subscription-key={key}"
|
||||
zip_path = ecw_dir / f"{tile.os_tile_id}.zip"
|
||||
last_error: Exception | None = None
|
||||
for attempt in range(retries + 1):
|
||||
try:
|
||||
with urllib.request.urlopen(
|
||||
|
|
@ -196,7 +195,6 @@ def _download_and_extract(
|
|||
shutil.copyfileobj(response, out, length=1 << 20)
|
||||
break
|
||||
except (urllib.error.URLError, TimeoutError, ConnectionError) as err:
|
||||
last_error = err
|
||||
if attempt == retries:
|
||||
raise RuntimeError(f"Failed to download {url}: {err}") from err
|
||||
extracted: list[Path] = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue