aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-08-04 10:33:15 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-08-05 16:11:29 +0200
commit83b4671112914081b3912dc06f006ed84147386a (patch)
tree8a09abae99552d2437aae0f42d7354180e19d858 /pyaggr3g470r
parentUpdated translations. (diff)
downloadnewspipe-83b4671112914081b3912dc06f006ed84147386a.tar.gz
newspipe-83b4671112914081b3912dc06f006ed84147386a.tar.bz2
newspipe-83b4671112914081b3912dc06f006ed84147386a.zip
more elegant method to check for icons
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/controllers/feed.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/pyaggr3g470r/controllers/feed.py b/pyaggr3g470r/controllers/feed.py
index 6b3c4fb5..a8e96217 100644
--- a/pyaggr3g470r/controllers/feed.py
+++ b/pyaggr3g470r/controllers/feed.py
@@ -21,7 +21,6 @@
import logging
from datetime import datetime, timedelta
-from werkzeug.exceptions import NotFound
import conf
from .abstract import AbstractController
@@ -59,9 +58,7 @@ class FeedController(AbstractController):
if not attrs.get('icon_url'):
return
icon_contr = IconController()
- try:
- icon_contr.get(url=attrs['icon_url'])
- except NotFound:
+ if not icon_contr.read(url=attrs['icon_url']).count():
icon_contr.create(**{'url': attrs['icon_url']})
def create(self, **attrs):
bgstack15