Skip to content

Commit

Permalink
Fix a crash calling product_info twice
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Feb 23, 2024
1 parent d36ec64 commit 59090a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sarsen/sentinel1.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ def open_dataset_autodetect(
product_urlpath: str,
group: Optional[str] = None,
chunks: Optional[Union[int, Dict[str, int]]] = None,
check_files_exist: bool = False,
**kwargs: Any,
) -> Tuple[xr.Dataset, Dict[str, Any]]:
kwargs.setdefault("engine", "sentinel-1")
try:
ds = xr.open_dataset(product_urlpath, group=group, chunks=chunks, **kwargs)
ds = xr.open_dataset(
product_urlpath,
group=group,
chunks=chunks,
check_files_exist=check_files_exist,
**kwargs,
)
except FileNotFoundError:
# re-try with Planetary Computer option
kwargs[
Expand Down

0 comments on commit 59090a2

Please sign in to comment.