From 938e557c98eb7e7256b62bddd9310f426ab490d1 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Fri, 25 Nov 2011 17:09:56 +0100 Subject: Bugfix. The mutex was not released in the function load_feed() when an excpetion occurs in the SQLite querry. --- utils.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'utils.py') diff --git a/utils.py b/utils.py index 87db57dd..0f5453c3 100755 --- a/utils.py +++ b/utils.py @@ -417,9 +417,13 @@ def load_feed(): # Walk through the list of feeds for feed in [x[1] for x in tupleList]: - list_of_articles = c.execute(\ - "SELECT * FROM articles WHERE feed_link='" + \ - feed[2] + "'").fetchall() + try: + list_of_articles = c.execute(\ + "SELECT * FROM articles WHERE feed_link='" + \ + feed[2] + "'").fetchall() + except: + LOCKER.release() + continue sha1_hash = hashlib.sha1() sha1_hash.update(feed[2].encode('utf-8')) feed_id = sha1_hash.hexdigest() -- cgit