OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-xarray?expand=0&rev=112
20 lines
723 B
Diff
20 lines
723 B
Diff
Index: xarray-2025.03.0/xarray/tutorial.py
|
|
===================================================================
|
|
--- xarray-2025.03.0.orig/xarray/tutorial.py
|
|
+++ xarray-2025.03.0/xarray/tutorial.py
|
|
@@ -164,9 +164,11 @@ def open_dataset(
|
|
downloader = pooch.HTTPDownloader(headers=headers)
|
|
|
|
# retrieve the file
|
|
- filepath = pooch.retrieve(
|
|
- url=url, known_hash=None, path=cache_dir, downloader=downloader
|
|
- )
|
|
+ fname = pathlib.Path(cache_dir, path).expanduser()
|
|
+ if not fname.exists():
|
|
+ fname = None
|
|
+ filepath = pooch.retrieve(url=url, fname=fname, known_hash=None, path=cache_dir)
|
|
+
|
|
ds = _open_dataset(filepath, engine=engine, **kws)
|
|
if not cache:
|
|
ds = ds.load()
|