aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index f95007b6..1c879b31 100755
--- a/utils.py
+++ b/utils.py
@@ -49,6 +49,7 @@ from datetime import datetime
from string import punctuation
from collections import Counter
from collections import OrderedDict
+from collections import defaultdict
from StringIO import StringIO
@@ -347,7 +348,7 @@ def load_feed():
# article_link, article_description, article_readed, like)
# feeds[feed_id] = (nb_article, nb_article_unreaded, feed_image,
# feed_title, feed_link, feed_site_link, mail)
- articles, feeds = {}, OrderedDict()
+ articles, feeds = defaultdict(list), OrderedDict()
if list_of_feeds != []:
sha1_hash = hashlib.sha1()
# Case-insensitive sorting
@@ -378,7 +379,7 @@ def load_feed():
# add the informations about the current article
# to the list of articles of the current feed
- articles[feed_id] = articles.get(feed_id, [])
+ #articles[feed_id] = articles.get(feed_id, [])
articles[feed_id].append(article_list)
# informations about a feed
bgstack15