diff options
author | cedricbonhomme <devnull@localhost> | 2011-11-25 17:09:56 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2011-11-25 17:09:56 +0100 |
commit | 938e557c98eb7e7256b62bddd9310f426ab490d1 (patch) | |
tree | 5288ab0a6eb0918501cb200cd0d5c4d823bef63c | |
parent | Minor improvement. Ensure that the size of the string to encode is less than ... (diff) | |
download | newspipe-938e557c98eb7e7256b62bddd9310f426ab490d1.tar.gz newspipe-938e557c98eb7e7256b62bddd9310f426ab490d1.tar.bz2 newspipe-938e557c98eb7e7256b62bddd9310f426ab490d1.zip |
Bugfix. The mutex was not released in the function load_feed() when an excpetion occurs in the SQLite querry.
-rwxr-xr-x | utils.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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() |