From 6e331efba3ccaa86f01778fb52f3c7b4fbaf51b7 Mon Sep 17 00:00:00 2001 From: bgeels <bgeels@usgs.gov> Date: Wed, 7 Aug 2024 10:49:45 -0600 Subject: [PATCH] It might be a good idea to actually use the timeout params... --- geomagio/metadata/MetadataFactory.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/geomagio/metadata/MetadataFactory.py b/geomagio/metadata/MetadataFactory.py index 2f718fe3..3212f6e7 100644 --- a/geomagio/metadata/MetadataFactory.py +++ b/geomagio/metadata/MetadataFactory.py @@ -127,8 +127,7 @@ class MetadataFactory(object): The Metadata object corresponding to the given ID. """ response = requests.get( - url=f"{self.url}/{id}", - headers=self._get_headers(), + url=f"{self.url}/{id}", headers=self._get_headers(), timeout=timeout ) return Metadata(**response.json()) @@ -155,6 +154,7 @@ class MetadataFactory(object): url=self.url, data=metadata.json(), headers=self._get_headers(), + timeout=timeout, ) return Metadata(**response.json()) @@ -182,6 +182,7 @@ class MetadataFactory(object): url=f"{self.url}/{metadata.id}", data=metadata.json(), headers=self._get_headers(), + timeout=timeout, ) return Metadata(**response.json()) -- GitLab