diff --git a/atomstrom.py b/atomstrom.py index 0644918..6ba6ceb 100755 --- a/atomstrom.py +++ b/atomstrom.py @@ -182,10 +182,16 @@ def mail_daily_digest(session, sender, receiver, prefix): link = entry.link if entry.resolvedlink: link = entry.resolvedlink - body = body + '=> %s - %s\n' % (entry.firstfetched.strftime('%y%m%d-%H%M'), feedinfo.title) - body = body + ' %s\n' % entry.title - body = body + '%s\n' % get_entry_text(entry)[0:100] - body = body + '%s\n\n' % link + try: + body = body + '=> %s - %s\n' % (entry.firstfetched.strftime('%y%m%d-%H%M'), feedinfo.title) + body = body + ' %s\n' % entry.title.decode('latin-1') + body = body + '%s\n' % get_entry_text(entry)[0:100] + body = body + '%s\n\n' % link + except: + print 'ERROR processing entry %s' % entry.id; + print sys.exc_info() + print 'not sending mail' + return if count > 0: today = datetime.now() subject = '%s (%s) - %d entries' % (today.strftime('%y%m%d'), today.strftime('%A'), count)