diff options
author | b8raoult <53792887+b8raoult@users.noreply.github.com> | 2020-06-10 09:48:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-10 09:48:30 +0100 |
commit | e358418b2eb89e17b4863326345bfe7c9fef307e (patch) | |
tree | d7466d8496cef2a47fd27c6ee0642453eed27e1d /cdsapi/api.py | |
parent | b0334c35e98503e6b89860782e719fa6541c7429 (diff) | |
parent | 5b5d69d69541c356408518e2e3f30e34fb6177cf (diff) |
Merge pull request #6 from wattsight/handle_read_timeout
Protect against ReadTimeout errors sometimes returned by requests.
Diffstat (limited to 'cdsapi/api.py')
-rw-r--r-- | cdsapi/api.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cdsapi/api.py b/cdsapi/api.py index a26da8b..d4c5a60 100644 --- a/cdsapi/api.py +++ b/cdsapi/api.py @@ -548,7 +548,7 @@ class Client(object): while tries < self.retry_max: try: r = call(*args, **kwargs) - except requests.exceptions.ConnectionError as e: + except (requests.exceptions.ConnectionError, requests.exceptions.ReadTimeout) as e: r = None self.warning("Recovering from connection error [%s], attemps %s of %s", e, tries, self.retry_max) |