From 2fc73dddd00a978dd64d53e83572b5f6e65b2e09 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 21 Jan 2015 22:08:22 +0100 Subject: Test if we effectively have retrieved some articles. --- pyaggr3g470r/crawler.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pyaggr3g470r') diff --git a/pyaggr3g470r/crawler.py b/pyaggr3g470r/crawler.py index 42430b5e..e6daecd4 100644 --- a/pyaggr3g470r/crawler.py +++ b/pyaggr3g470r/crawler.py @@ -144,6 +144,8 @@ def fetch(user, feed): def insert_database(user, feed): articles = yield from asyncio.async(fetch(user, feed)) + if None is articles: + return [] print('inserting articles for {}'.format(feed.title)) -- cgit