From 0ec37de466014dfa7cf3821f8d935df621a7574d Mon Sep 17 00:00:00 2001 From: Quentin POLLET Date: Sun, 3 May 2020 23:49:38 +0200 Subject: [PATCH 1/2] Fix 450 RecursionError --- pyicloud/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyicloud/base.py b/pyicloud/base.py index 23e2b4f..b36fc37 100644 --- a/pyicloud/base.py +++ b/pyicloud/base.py @@ -69,6 +69,7 @@ class PyiCloudSession(Session): request_logger.debug("%s %s %s", method, url, kwargs.get("data", "")) + has_retried = kwargs.get("retried") kwargs.pop("retried", None) response = super(PyiCloudSession, self).request(method, url, **kwargs) @@ -76,11 +77,11 @@ class PyiCloudSession(Session): json_mimetypes = ["application/json", "text/json"] if not response.ok and content_type not in json_mimetypes: - if kwargs.get("retried") is None and response.status_code == 450: + if has_retried is None and response.status_code == 450: api_error = PyiCloudAPIResponseException( response.reason, response.status_code, retry=True ) - request_logger.warn(api_error) + request_logger.debug(api_error) kwargs["retried"] = True return self.request(method, url, **kwargs) self._raise_error(response.status_code, response.reason) From 9ee3f70c8bbf918e37a56beaec3fd769e6125930 Mon Sep 17 00:00:00 2001 From: Quentin POLLET Date: Sun, 3 May 2020 23:57:48 +0200 Subject: [PATCH 2/2] Release 0.9.7 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f175ce7..de7c062 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages from codecs import open REPO_URL = "https://github.com/picklepete/pyicloud" -VERSION = "0.9.6.1" +VERSION = "0.9.7" with open("requirements.txt") as f: required = f.read().splitlines()