Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/multirtc/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ def download_file(
if chunk:
f.write(chunk)
logging.info(f'Download successful: {url}')
except requests.exceptions.RequestException as e:
except requests.exceptions.RequestException:
logging.exception(f'Download failed: {url}')
if download_path is not None:
download_path.unlink(missing_ok=True) # delete any partial downloads
download_path.unlink(missing_ok=True) # delete any partial downloads
raise
finally:
session.close()
Expand Down
4 changes: 3 additions & 1 deletion tests/test_dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@


def test_get_granule_url():
test_url = 'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/DEM/v1.2/EPSG4326/S10/S10_W020/DEMS01_00_W001_00_C01.tif'
test_url = (
'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/DEM/v1.2/EPSG4326/S10/S10_W020/DEMS01_00_W001_00_C01.tif'
)
url = dem.get_dem_granule_url(-1, -1)
assert url == test_url

Expand Down