Unverified Commit 0c33c2d1 authored by parazyd's avatar parazyd

Handle uncaught ConnectionResetError in net/download.

parent ecda2560
...@@ -22,7 +22,8 @@ def download(uris): ...@@ -22,7 +22,8 @@ def download(uris):
try: try:
rfile = requests.get(url, stream=True, timeout=20) rfile = requests.get(url, stream=True, timeout=20)
except (requests.exceptions.ConnectionError, except (requests.exceptions.ConnectionError,
requests.exceptions.ReadTimeout) as err: requests.exceptions.ReadTimeout,
ConnectionResetError) as err:
warn('Caught exception: "%s". Retrying...' % err) warn('Caught exception: "%s". Retrying...' % err)
return download(uris) return download(uris)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment