From 6111ca5fcf8cb38596130688f7883f3e87f4c362 Mon Sep 17 00:00:00 2001 From: kaliko Date: Sun, 16 Nov 2014 16:46:19 +0100 Subject: [PATCH] Fixed xhtml-im formating in Feeds --- sid/feeds.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sid/feeds.py b/sid/feeds.py index b3dd19f..dd3c781 100644 --- a/sid/feeds.py +++ b/sid/feeds.py @@ -64,7 +64,7 @@ class FeedMonitor(threading.Thread): # unusual return http code if parsed_feed.status != 200: - self.plugin.log.error( + self.plugin.log.warning( 'Got code %(status)d from "%(href)s" (please update).' % parsed_feed) return @@ -99,14 +99,14 @@ class FeedMonitor(threading.Thread): body = '%(title)s %(link)s' % post text.append(body) - xpost = dict(**post) - xpost['title'] = html_escape(xpost.get('title', 'n/a')) - xbody = '%(title)s' % xpost + xpost = {'title': html_escape(post.get('title', 'n/a'))} + xpost['link'] = html_escape(post.get('link',)) + xbody = '{title}'.format(**xpost) xhtml.append(xbody) # Updating self.seen self.seen[feed_id] = entries if len(text) > 1: - self.plugin.send({'mbody':'
'.join(xhtml), 'mhtml':'\n'.join(text)}) + self.plugin.send({'mhtml':'
'.join(xhtml), 'mbody':'\n'.join(text)}) def run(self): while not self.thread_killed: -- 2.39.5