aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-11-25 14:35:18 +0100
committercedricbonhomme <devnull@localhost>2010-11-25 14:35:18 +0100
commit0b83680559e094d2b13ce2960c51c0aa1baf34c0 (patch)
treef85e4ed042e020bbc58086366cfcbbd49a7a867a /utils.py
parentE-mail notifications are now sent with an HTML content and with an alternativ... (diff)
downloadnewspipe-0b83680559e094d2b13ce2960c51c0aa1baf34c0.tar.gz
newspipe-0b83680559e094d2b13ce2960c51c0aa1baf34c0.tar.bz2
newspipe-0b83680559e094d2b13ce2960c51c0aa1baf34c0.zip
Minor bug fix (when data base is empty).
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils.py b/utils.py
index 8a22b2be..29ca6531 100755
--- a/utils.py
+++ b/utils.py
@@ -369,6 +369,11 @@ def load_feed():
except:
pass
+ nb_articles = 0
+ nb_unread_articles = 0
+ nb_mail_notifications = 0
+ nb_favorites = 0
+
# articles[feed_id] = (article_id, article_date, article_title,
# article_link, article_description, article_readed,
# article_language, like)
@@ -381,11 +386,6 @@ def load_feed():
tupleList = [(x[0].lower(), x) for x in list_of_feeds]
tupleList.sort(key=operator.itemgetter(0))
- nb_articles = 0
- nb_unread_articles = 0
- nb_mail_notifications = 0
- nb_favorites = 0
-
for feed in [x[1] for x in tupleList]:
list_of_articles = c.execute(\
"SELECT * FROM articles WHERE feed_link='" + \
bgstack15