summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-05 01:09:25 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-05 01:09:25 +0200
commitf5e87963a7a1eb74ae69eda9388271e219ea2d97 (patch)
treefb0b2f257e0f8c97631fd9386b5e64ca012e2783 /data/rbot
parent48add0bcc08d226e1a7164c9d2eaf14a2609b533 (diff)
lastfm plugin: fail more graciously when no event is returned
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/lastfm.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/lastfm.rb b/data/rbot/plugins/lastfm.rb
index 08a56f8c..6482b543 100644
--- a/data/rbot/plugins/lastfm.rb
+++ b/data/rbot/plugins/lastfm.rb
@@ -110,7 +110,7 @@ class LastFmPlugin < Plugin
doc = Document.new xml.body
if xml.class == Net::HTTPInternalServerError
- if doc.root.attributes["status"] == "failed"
+ if doc.root and doc.root.attributes["status"] == "failed"
m.reply doc.root.elements["error"].text
else
m.reply _("Could not retrieve events")