From 472ee03dd8fd944a014f9508685c9b2dc6c5614c Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Mon, 14 Oct 2024 15:19:53 +0100 Subject: [PATCH] if satellite env var has not been set, dont use it --- pvnet_app/data/satellite.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pvnet_app/data/satellite.py b/pvnet_app/data/satellite.py index 2c8c0cf..711fadb 100644 --- a/pvnet_app/data/satellite.py +++ b/pvnet_app/data/satellite.py @@ -28,6 +28,10 @@ def download_all_sat_data() -> bool: # Set variable to track whether the satellite download is successful sat_available = False + if "SATELLITE_ZARR_PATH" not in os.environ: + logger.info("SATELLITE_ZARR_PATH has not be set. " + "No satellite data will be downloaded.") + return False # download 5 minute satellite data sat_5_dl_path = os.environ["SATELLITE_ZARR_PATH"]