diff --git a/l2json/sources/minio.py b/l2json/sources/minio.py index 424b56daf2553aeb14095c875706ee30d8f7919d..47dd72584ca37ba9373a55556ccba5c628a9b189 100644 --- a/l2json/sources/minio.py +++ b/l2json/sources/minio.py @@ -176,9 +176,13 @@ def fetch_from_minio( tqdm_desc="Parsing metadata", ) ] - if not len(metadata): - raise KeyError(f"No metadata was found for {station}/{statistics_type}/{antennafield} @ {tstart} - {tend}") else: metadata = [] + if fetch_metadata and not len(metadata): + if len(data): + raise KeyError(f"No metadata was found for {station}/{statistics_type}/{antennafield} @ {tstart} - {tend}") + else: + print(f"No metadata was found for {station}/{statistics_type}/{antennafield} @ {tstart} - {tend}") + return metadata, data