From 1837ee6e85d58546a4b5fb1a84e60952f05762c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Wed, 22 Mar 2023 15:44:03 -0600 Subject: [PATCH] Add timeout to requests --- old/v1.3/integrationSplynx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/old/v1.3/integrationSplynx.py b/old/v1.3/integrationSplynx.py index f8b24a23..e2c8661b 100644 --- a/old/v1.3/integrationSplynx.py +++ b/old/v1.3/integrationSplynx.py @@ -16,7 +16,7 @@ def spylnxRequest(target, headers): # Sends a REST GET request to Spylnx and returns the # result in JSON url = splynx_api_url + "/api/2.0/" + target - r = requests.get(url, headers=headers) + r = requests.get(url, headers=headers, timeout=10) return r.json() def getTariffs(headers):