aboutsummaryrefslogtreecommitdiff
path: root/src/web/views/feed.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/views/feed.py')
-rw-r--r--src/web/views/feed.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/web/views/feed.py b/src/web/views/feed.py
index 69972958..9de45a7e 100644
--- a/src/web/views/feed.py
+++ b/src/web/views/feed.py
@@ -1,5 +1,6 @@
#! /usr/bin/env python
# -*- coding: utf-8 -
+import logging
import requests.exceptions
from datetime import datetime, timedelta
from sqlalchemy import desc
@@ -18,6 +19,7 @@ from web.forms import AddFeedForm
from web.controllers import (CategoryController, FeedController,
ArticleController)
+logger = logging.getLogger(__name__)
feeds_bp = Blueprint('feeds', __name__, url_prefix='/feeds')
feed_bp = Blueprint('feed', __name__, url_prefix='/feed')
@@ -114,6 +116,9 @@ def bookmarklet():
flash(gettext("Impossible to connect to the address: {}.".format(url)),
"danger")
return redirect(url_for('home'))
+ except Exception:
+ logger.exception('something bad happened when fetching %r', url)
+ return redirect(url_for('home'))
if not feed.get('link'):
feed['enabled'] = False
flash(gettext("Couldn't find a feed url, you'll need to find a Atom or"
bgstack15