diff options
-rw-r--r-- | pyaggr3g470r/crawler.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pyaggr3g470r/crawler.py b/pyaggr3g470r/crawler.py index cdbbab8d..a2a0dc4a 100644 --- a/pyaggr3g470r/crawler.py +++ b/pyaggr3g470r/crawler.py @@ -203,10 +203,11 @@ def retrieve_feed(user, feed_id=None): if feed_id is not None: feeds = [feed for feed in feeds if feed.id == feed_id] - # 2 - Fetch the feeds. - loop = asyncio.get_event_loop() - f = asyncio.wait([init_process(user, feed) for feed in feeds]) - loop.run_until_complete(f) + if feeds != []: + # 2 - Fetch the feeds. + loop = asyncio.get_event_loop() + f = asyncio.wait([init_process(user, feed) for feed in feeds]) + loop.run_until_complete(f) """ # 4 - Indexation @@ -218,4 +219,4 @@ def retrieve_feed(user, feed_id=None): self.mail_notification(new_articles) """ - logger.info("All articles retrieved. End of the processus.")
\ No newline at end of file + logger.info("All articles retrieved. End of the processus.") |