Mercurial > hg > skillbot
changeset 63:27f9196fd610
Adding check for temporary API failures
author | Dominic Cleal <dominic@computerkb.co.uk> |
---|---|
date | Sat, 21 Feb 2009 01:03:33 +0000 |
parents | f620582dee33 |
children | 962dada7587e |
files | skillbot.pl |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)