From f5e87963a7a1eb74ae69eda9388271e219ea2d97 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sat, 5 Jul 2008 01:09:25 +0200 Subject: lastfm plugin: fail more graciously when no event is returned --- data/rbot/plugins/lastfm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data') 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") -- cgit v1.2.3