From cc85e55144bb095303ac6e27dd0859953584bddb Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 20 Jan 2013 23:34:41 +0100 Subject: Send mail for a subscribed feed and then add to database. --- source/feedgetter.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/feedgetter.py b/source/feedgetter.py index 2dc892ac..3215d1ab 100755 --- a/source/feedgetter.py +++ b/source/feedgetter.py @@ -155,13 +155,12 @@ class FeedGetter(object): articles.append(article) - self.articles.add_articles(articles, feed_id) - - if feed["mail"]: - # send new articles by e-mail if desired. - threading.Thread(None, utils.send_mail, None, (conf.mail_from, conf.mail_to, \ + if feed["mail"]: + # send new articles by e-mail if desired. + threading.Thread(None, utils.send_mail, None, (conf.mail_from, conf.mail_to, \ a_feed.feed.title, \ article_title, description)).start() + self.articles.add_articles(articles, feed_id) if __name__ == "__main__": -- cgit