# HG changeset patch # User Dominic Cleal # Date 1235178213 0 # Node ID 27f9196fd61078938c0c2a4499780ee2dec0ecfb # Parent f620582dee335a15739e36b5fe008745fcdc785d Adding check for temporary API failures diff -r f620582dee33 -r 27f9196fd610 skillbot.pl --- a/skillbot.pl Thu Jan 01 11:20:10 2009 +0000 +++ b/skillbot.pl Sat Feb 21 01:03:33 2009 +0000 @@ -490,7 +490,11 @@ # Don't attempt updates during downtime, can cause crash return if (timestamp_in_downtime(time)); - my $skill = $f->{char_api}->skill->in_training; + my $char_skill = $f->{char_api}->skill; + # Sometimes this is undefined if there's an API error, try later + return unless defined $char_skill; + + my $skill = $char_skill->in_training; # Nothing training unless (defined $skill)