aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2015-05-27 14:39:27 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2015-05-27 14:39:27 +0200
commita8b2af256b38aeb054d4ce670d6e273006586709 (patch)
tree00ee9436872d220d62e63e35227b24f8091ab085 /pyaggr3g470r
parentFeedpaser is now fixed. (diff)
downloadnewspipe-a8b2af256b38aeb054d4ce670d6e273006586709.tar.gz
newspipe-a8b2af256b38aeb054d4ce670d6e273006586709.tar.bz2
newspipe-a8b2af256b38aeb054d4ce670d6e273006586709.zip
Run the asyncio loop in a try block.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/crawler.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pyaggr3g470r/crawler.py b/pyaggr3g470r/crawler.py
index cada119b..8052fb63 100644
--- a/pyaggr3g470r/crawler.py
+++ b/pyaggr3g470r/crawler.py
@@ -248,7 +248,9 @@ def retrieve_feed(user, feed_id=None):
tasks = [asyncio.ensure_future(init_process(user, feed)) for feed in feeds]
except:
tasks = [init_process(user, feed) for feed in feeds]
- loop.run_until_complete(asyncio.wait(tasks))
- loop.close()
+ try:
+ loop.run_until_complete(asyncio.wait(tasks))
+ finally:
+ loop.close()
logger.info("All articles retrieved. End of the processus.")
bgstack15