aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2011-11-25 17:09:56 +0100
committercedricbonhomme <devnull@localhost>2011-11-25 17:09:56 +0100
commit938e557c98eb7e7256b62bddd9310f426ab490d1 (patch)
tree5288ab0a6eb0918501cb200cd0d5c4d823bef63c
parentMinor improvement. Ensure that the size of the string to encode is less than ... (diff)
downloadnewspipe-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-xutils.py10
1 files changed, 7 insertions, 3 deletions
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()
bgstack15