From ac7bb99a1ab33b5ea77d10af972978d10e477470 Mon Sep 17 00:00:00 2001 From: Balaji Kotni <67455293+Balaji-Kotni@users.noreply.github.com> Date: Thu, 3 Mar 2022 10:07:12 +0530 Subject: [PATCH] timeout increased to 10sec before timeout set to 5sec its very low some times if network is not good getting this error : raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='......', port=....): Read timed out. (read timeout=5) for every two request i am getting this problem so i increased the timeout to 10 sec... Thank you. --- woocommerce/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/woocommerce/api.py b/woocommerce/api.py index a97c901..cff2d14 100644 --- a/woocommerce/api.py +++ b/woocommerce/api.py @@ -27,7 +27,7 @@ def __init__(self, url, consumer_key, consumer_secret, **kwargs): self.wp_api = kwargs.get("wp_api", True) self.version = kwargs.get("version", "wc/v3") self.is_ssl = self.__is_ssl() - self.timeout = kwargs.get("timeout", 5) + self.timeout = kwargs.get("timeout", 10) self.verify_ssl = kwargs.get("verify_ssl", True) self.query_string_auth = kwargs.get("query_string_auth", False) self.user_agent = kwargs.get("user_agent", f"WooCommerce-Python-REST-API/{__version__}")