Skip to content
Snippets Groups Projects
Commit c1a88c7c authored by David McKenna's avatar David McKenna
Browse files

FIX: Only error if data is present and metadata is missing

parent b7a77e29
No related branches found
No related tags found
1 merge request!37FIX: Only error if data is present and metadata is missing
Pipeline #120862 passed
Pipeline: l2json

#120863

    ...@@ -176,9 +176,13 @@ def fetch_from_minio( ...@@ -176,9 +176,13 @@ def fetch_from_minio(
    tqdm_desc="Parsing metadata", tqdm_desc="Parsing metadata",
    ) )
    ] ]
    if not len(metadata):
    raise KeyError(f"No metadata was found for {station}/{statistics_type}/{antennafield} @ {tstart} - {tend}")
    else: else:
    metadata = [] 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 return metadata, data
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment