]> kaliko git repositories - sid.git/commitdiff
feeds: catch ConnectionError to avoid killing thread
authorkaliko <kaliko@azylum.org>
Fri, 23 Oct 2020 18:30:03 +0000 (20:30 +0200)
committerkaliko <kaliko@azylum.org>
Fri, 23 Oct 2020 18:30:03 +0000 (20:30 +0200)
sid/feeds.py

index 7fe582587d5b6a876988d270909a5f34b0d5bb07..490d89de5816b230b5f3b91dc0f2afb5ffb5c548 100644 (file)
@@ -124,6 +124,8 @@ class FeedMonitor(threading.Thread):
             for feed in self.feeds_list:
                 try:
                     self.new_posts(feed)
+                except ConnectionError as err:  # Non fatal exception
+                    self.plugin.log.error(f'connection error on {feed}: {err}')
                 except URLError as err:  # Non fatal exception
                     self.plugin.log.error(f'error for {feed}: {err.reason}')
                 except Exception as err:  # Unknown execption, killing thread anyway