From f684b70bca0b294b57611ef0edf140da839315e8 Mon Sep 17 00:00:00 2001 From: peterdudfield Date: Tue, 7 Jan 2025 14:31:55 +0000 Subject: [PATCH] small fixes --- .../internal/repositories/raw_repositories/mo_datahub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nwp_consumer/internal/repositories/raw_repositories/mo_datahub.py b/src/nwp_consumer/internal/repositories/raw_repositories/mo_datahub.py index 5b5631b..16d519b 100644 --- a/src/nwp_consumer/internal/repositories/raw_repositories/mo_datahub.py +++ b/src/nwp_consumer/internal/repositories/raw_repositories/mo_datahub.py @@ -155,7 +155,7 @@ def fetch_init_data( if "orderDetails" in data and "files" in data["orderDetails"]: for filedata in data["orderDetails"]["files"]: if "fileId" in filedata and "+" not in filedata["fileId"]: - urls.append(f"{self.request_url}/{filedata["fileId"]}/data") + urls.append(f"{self.request_url}/{filedata['fileId']}/data") log.debug( f"Found {len(urls)} file(s) for init time '{it.strftime('%Y-%m-%d %H:%M')}' " @@ -185,7 +185,7 @@ def _download(self, url: str) -> ResultE[pathlib.Path]: "RAWDIR", f"~/.local/cache/nwp/{self.repository().name}/{self.model().name}/raw", ), - ) / f"{url.split("/")[-2]}.grib" + ) / f"{url.split('/')[-2]}.grib" ).expanduser() # Only download the file if not already present