commit 0c33c2d195c702f928e0e4299fed9ca8252eb85f
parent ecda256008e80e7182c0443331872db2186d9d95
Author: parazyd <parazyd@dyne.org>
Date:   Mon, 17 Jun 2019 23:20:30 +0200
Handle uncaught ConnectionResetError in net/download.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/net.py b/lib/net.py
@@ -22,7 +22,8 @@ def download(uris):
     try:
         rfile = requests.get(url, stream=True, timeout=20)
     except (requests.exceptions.ConnectionError,
-            requests.exceptions.ReadTimeout) as err:
+            requests.exceptions.ReadTimeout,
+            ConnectionResetError) as err:
         warn('Caught exception: "%s". Retrying...' % err)
         return download(uris)