Use get to avoid a KeyError.

This commit is contained in:
James Vega 2005-02-22 14:28:45 +00:00
parent 3f94bf6dae
commit 25ae2a52cf

View File

@ -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