From 974e2e1e697a7622e22d527bccbf7e8d281c5288 Mon Sep 17 00:00:00 2001 From: salewis38 <46199139+salewis38@users.noreply.github.com> Date: Thu, 21 Sep 2023 22:01:28 +0100 Subject: [PATCH] Added missing request timeout Line 114. Best practice to declare timeout on all requests. --- palm_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/palm_utils.py b/palm_utils.py index fbca95c..b241654 100644 --- a/palm_utils.py +++ b/palm_utils.py @@ -111,7 +111,7 @@ def get_latest_data(self): } try: - resp = requests.request('GET', url, headers=headers) + resp = requests.request('GET', url, headers=headers, timeout=10) except requests.exceptions.RequestException as error: logger.error(error) return