diff options
author | cedricbonhomme <devnull@localhost> | 2010-03-24 09:29:39 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-03-24 09:29:39 +0100 |
commit | 2b54c068f99b826982e72af1c3e3d18c7a5a9a7f (patch) | |
tree | 0c4b7eb8d5891cb986707fa7720ed4581375527d /feedgetter.py | |
parent | Release 1.0. Mail notification. A lot of improvements and some bug fix. (diff) | |
download | newspipe-2b54c068f99b826982e72af1c3e3d18c7a5a9a7f.tar.gz newspipe-2b54c068f99b826982e72af1c3e3d18c7a5a9a7f.tar.bz2 newspipe-2b54c068f99b826982e72af1c3e3d18c7a5a9a7f.zip |
Mail notifications are sent through a new thread. Some improvements.
Diffstat (limited to 'feedgetter.py')
-rwxr-xr-x | feedgetter.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/feedgetter.py b/feedgetter.py index 5239dd2a..70883ed5 100755 --- a/feedgetter.py +++ b/feedgetter.py @@ -125,13 +125,11 @@ class FeedGetter(object): result = self.c.execute("SELECT mail from feeds WHERE feed_site_link='" + \ a_feed.feed.link.encode('utf-8') + "'").fetchall() if result[0][0] == "1": - # send the article - utils.send_mail(utils.mail_from, utils.mail_to, \ - a_feed.feed.title.encode('utf-8'), description) + # send the article by e-mail threading.Thread(None, utils.send_mail, \ None, (utils.mail_from, utils.mail_to, \ a_feed.feed.title.encode('utf-8'), description) \ - ) + ).start() except sqlite3.IntegrityError: # article already in the base pass |