summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-11-30 18:08:07 -0600
committerJesse Luehrs <doy@tozt.net>2009-11-30 18:08:07 -0600
commit07dd20c4443a2231bda204744bfa553c8055de00 (patch)
tree6841c6946adbc51e5008e22b74fd87350361a6eb /lib
parent2967b6b4c14510d981b5e98b289bfa98dc5a70b8 (diff)
downloadcrawlbot-07dd20c4443a2231bda204744bfa553c8055de00.tar.gz
crawlbot-07dd20c4443a2231bda204744bfa553c8055de00.zip
handle rpc failure better
Diffstat (limited to 'lib')
-rw-r--r--lib/Crawl/Bot/Plugin/Wiki.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Crawl/Bot/Plugin/Wiki.pm b/lib/Crawl/Bot/Plugin/Wiki.pm
index 586aeeb..44765d5 100644
--- a/lib/Crawl/Bot/Plugin/Wiki.pm
+++ b/lib/Crawl/Bot/Plugin/Wiki.pm
@@ -32,6 +32,8 @@ sub tick {
my $xmlrpc = XML::RPC->new($self->xmlrpc_location);
warn "Getting recent wiki changes...";
my $changes = $xmlrpc->call('wiki.getRecentChanges', $last_checked);
+ # ->call returns a hashref with error info on failure
+ return unless ref($changes) eq 'ARRAY';
for my $change (@$changes) {
warn "Page $change->{name} changed";
my $history = $xmlrpc->call('wiki.getPageVersions', $change->{name}, 0);