tAdd retry counter for network and os errors. - zs - Zeitungsschau rss to email converter
(HTM) git clone git://r-36.net/zs
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 8a135f44eb82ce00357a28f8196bc6c3de7d1cd3
(DIR) parent d618c2e01de3062741a3cf49902e09f0f6ad0dbd
(HTM) Author: Christoph Lohmann <20h@r-36.net>
Date: Sat, 7 Jul 2018 15:06:00 +0200
Add retry counter for network and os errors.
Diffstat:
zs | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/zs b/zs
t@@ -76,6 +76,9 @@ def run(db, selfeed=None, dryrun=False, onlychanges=False):
except requests.exceptions.TooManyRedirects:
estr = "redirects"
retries += 1
+ except OSError as err:
+ estr = err.strerror
+ retries += 1
if rcode == 404:
estr = "404"