aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-10-30 18:57:05 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-10-30 18:57:05 +0100
commitacc413eafbd8bae84d5ea9f156b32a35dcd9ad72 (patch)
treea11d76556c3f38e6968cf2360ece762643ead9fb
parentcount() is way faster than len(). (diff)
downloadnewspipe-acc413eafbd8bae84d5ea9f156b32a35dcd9ad72.tar.gz
newspipe-acc413eafbd8bae84d5ea9f156b32a35dcd9ad72.tar.bz2
newspipe-acc413eafbd8bae84d5ea9f156b32a35dcd9ad72.zip
context manager now useless
-rw-r--r--pyaggr3g470r/feedgetter.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/pyaggr3g470r/feedgetter.py b/pyaggr3g470r/feedgetter.py
index 16571294..5f1c707c 100644
--- a/pyaggr3g470r/feedgetter.py
+++ b/pyaggr3g470r/feedgetter.py
@@ -44,18 +44,6 @@ import utils
list_of_threads = []
-@contextmanager
-def opened_w_error(filename, mode="r"):
- try:
- f = open(filename, mode)
- except IOError as err:
- yield None, err
- else:
- try:
- yield f, None
- finally:
- f.close()
-
class FeedGetter(object):
"""
This class is in charge of retrieving feeds listed in ./var/feed.lst.
@@ -148,7 +136,7 @@ class FeedGetter(object):
article_title, description)).start()
"""
feed.articles.extend(articles)
- feed.articles = sorted(feed.articles, key=lambda t: t.date, reverse=True)
+ #feed.articles = sorted(feed.articles, key=lambda t: t.date, reverse=True)
feed.save()
bgstack15