tHandle uncaught ConnectionResetError in net/download. - amprolla - devuan's apt repo merger
HTML git clone https://git.parazyd.org/amprolla
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 0c33c2d195c702f928e0e4299fed9ca8252eb85f
DIR parent ecda256008e80e7182c0443331872db2186d9d95
HTML Author: parazyd <parazyd@dyne.org>
Date: Mon, 17 Jun 2019 23:20:30 +0200
Handle uncaught ConnectionResetError in net/download.
Diffstat:
M lib/net.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
DIR diff --git a/lib/net.py b/lib/net.py
t@@ -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)