From 25ae2a52cf40c91a7c1ed86e88c5650c9aae7258 Mon Sep 17 00:00:00 2001 From: James Vega Date: Tue, 22 Feb 2005 14:28:45 +0000 Subject: [PATCH] Use get to avoid a KeyError. --- plugins/RSS/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index ee8c1f913..e9fe0a247 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -361,7 +361,7 @@ class RSS(callbacks.Plugin): except registry.NonExistentRegistryEntry: pass feed = self.getFeed(url) - info = feed['channel'] + info = feed.get('channel') if not info: irc.error('I couldn\'t retrieve that RSS feed.') return