From f6d60942c51ad3cb9fe2a54056a462064570abc3 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 6 Feb 2009 19:29:32 +0100 Subject: [PATCH] rss plugin: don't abort if errors were found but rss is defined If we always abort, a failing first parser will cause a failure even though a subsequently tried parser succeeded in getting the feed right. So only return nil if rss was nil when the error list wasn't empty. --- data/rbot/plugins/rss.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb index 57bd6113..885ae248 100644 --- a/data/rbot/plugins/rss.rb +++ b/data/rbot/plugins/rss.rb @@ -1172,7 +1172,7 @@ class RSSFeedsPlugin < Plugin unless errors.empty? debug errors self.send(:report_problem, errors.last[2], errors.last[1], m) - return nil + return nil unless rss end items = [] if rss.nil? -- 2.39.5