diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-10-30 18:57:05 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-10-30 18:57:05 +0100 |
commit | acc413eafbd8bae84d5ea9f156b32a35dcd9ad72 (patch) | |
tree | a11d76556c3f38e6968cf2360ece762643ead9fb | |
parent | count() is way faster than len(). (diff) | |
download | newspipe-acc413eafbd8bae84d5ea9f156b32a35dcd9ad72.tar.gz newspipe-acc413eafbd8bae84d5ea9f156b32a35dcd9ad72.tar.bz2 newspipe-acc413eafbd8bae84d5ea9f156b32a35dcd9ad72.zip |
context manager now useless
-rw-r--r-- | pyaggr3g470r/feedgetter.py | 14 |
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() |