From ed9e87cb3b1798003f497479d87c287a574ee4a9 Mon Sep 17 00:00:00 2001 From: Panos Mavrogiorgos Date: Wed, 26 Apr 2023 09:36:59 +0300 Subject: [PATCH] Only try GRIB if it is available. --- inspectds/cli.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/inspectds/cli.py b/inspectds/cli.py index 540167b..f4e1fa9 100644 --- a/inspectds/cli.py +++ b/inspectds/cli.py @@ -17,11 +17,6 @@ except RuntimeError: IS_GRIB_AVAILABLE = False -SUPPORTED_DATASETS = { - "netcdf", - "zarr", -} - if IS_GRIB_AVAILABLE: SUPPORTED_DATASETS = { "grib", @@ -131,7 +126,7 @@ def inspect_dataset( dataset_type = infer_dataset_type(path) open_dataset_kwargs: dict[str, typing.Any] = {} - if dataset_type == DATASET_TYPE.GRIB: + if IS_GRIB_AVAILABLE and dataset_type == DATASET_TYPE.GRIB: open_dataset_kwargs.update( dict( engine="cfgrib",