summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+github@schneefux.xyz>2017-02-16 17:42:40 +0100
committerGitHub <noreply@github.com>2017-02-16 17:42:40 +0100
commit65d35088e2dff5915cb3a769fb227bd13bd68505 (patch)
tree9469ef25a5c8a3a99daa6e4ce0edf15b954c2c50
parent2256d1c371c93ca6313bbce9b126f69a3d2bad36 (diff)
downloadapigrabber-65d35088e2dff5915cb3a769fb227bd13bd68505.tar.gz
apigrabber-65d35088e2dff5915cb3a769fb227bd13bd68505.zip
catch ssl RuntimeError and retry (#24)
-rw-r--r--crawler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawler.py b/crawler.py
index f988375..7ceda92 100644
--- a/crawler.py
+++ b/crawler.py
@@ -38,7 +38,7 @@ class Crawler(object):
params=params) as response:
assert response.status == 200
return await response.json()
- except aiohttp.errors.ClientResponseError:
+ except (aiohttp.errors.ClientResponseError, RuntimeError):
logging.warning("error connecting to API, retrying")
return await self._req(session, path, params)