aboutsummaryrefslogtreecommitdiff
path: root/src/web/views/feed.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2016-01-31 02:24:10 +0100
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-31 02:28:01 +0100
commit9ca6a6989b0c87401f1a3903077723cd9a648a79 (patch)
tree40d36bf9a7b5bff1dcdb397b1208b736ef816b91 /src/web/views/feed.py
parentregistering modifications on feeds / categories (diff)
downloadnewspipe-9ca6a6989b0c87401f1a3903077723cd9a648a79.tar.gz
newspipe-9ca6a6989b0c87401f1a3903077723cd9a648a79.tar.bz2
newspipe-9ca6a6989b0c87401f1a3903077723cd9a648a79.zip
redoing navbar in react
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