aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index 1c699b34..ba0614c5 100755
--- a/utils.py
+++ b/utils.py
@@ -283,8 +283,11 @@ def load_feed():
articles, feeds = {}, OrderedDict()
if list_of_feeds != []:
sha1_hash = hashlib.sha1()
- print sorted(list_of_feeds)
- for feed in sorted(list_of_feeds):
+ # Case-insensitive sorting
+ tupleList = [(x[3].upper(), x) for x in list_of_feeds]
+ tupleList.sort(key=operator.itemgetter(0))
+
+ for feed in [x[1] for x in tupleList]:
list_of_articles = c.execute(\
"SELECT * FROM articles WHERE feed_link='" + \
feed[2] + "'").fetchall()
bgstack15