From b397ae871c5bd871ed45658f309cbd195d5b63ad Mon Sep 17 00:00:00 2001 From: konstntokas Date: Fri, 6 Dec 2024 17:30:08 +0100 Subject: [PATCH] allow multiple hrefs, take first --- xcube_stac/helper.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xcube_stac/helper.py b/xcube_stac/helper.py index e09fe0e..240fd82 100644 --- a/xcube_stac/helper.py +++ b/xcube_stac/helper.py @@ -241,8 +241,8 @@ def parse_item(self, item: pystac.Item, **open_params) -> pystac.Item: ) elif len(hrefs) > 1: LOG.warning( - f"N unique jp2 file found: {hrefs} are found " - f"for {href_base}/**/*_{asset_name}_{res_select}m.jp2" + f"Multiple hrefs {hrefs} are found " + f"for {href_base}/**/*_{asset_name}_{res_select}m.jp2. " f"Href {hrefs[0]} is taken." ) href_mod = hrefs[0] @@ -387,8 +387,8 @@ def parse_item(self, item: pystac.Item, **open_params) -> pystac.Item: ) elif len(hrefs) > 1: LOG.warning( - f"N unique jp2 file found: {hrefs} are found " - f"for {href_base}/**/*_{asset_name}_{res_select}m.jp2" + f"Multiple hrefs {hrefs} are found " + f"for {href_base}/**/*_{asset_name}_{res_select}m.jp2. " f"Href {hrefs[0]} is taken." ) href_mod = hrefs[0]