zs

Zeitungsschau rss to email converter
git clone git://r-36.net/zs
Log | Files | Refs | LICENSE

commit e8137c93ecc14a551eb6c2c0673e866d3d70d5f6
parent 0c956d19ba6f9d2b84509837c040d290b0b47c46
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sat, 31 Oct 2015 17:38:07 +0100

Handle smtplib errors.

Diffstat:
zs | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/zs b/zs @@ -18,6 +18,7 @@ import getopt import pprint import requests.exceptions import requests +import smtplib dodebug = False @@ -100,8 +101,11 @@ def run(db, selfeed=None, dryrun=False, onlychanges=False): len(ufeed["articles"]))) debug(ufeed) if dryrun == False: - sendfeed(db, ufeed) - db.setreadarticles(feeduri, ufeed) + try: + sendfeed(db, ufeed) + db.setreadarticles(feeduri, ufeed) + except smtplib.SMTPDataError: + return def usage(app): app = os.path.basename(app)