diff --git a/plugins/jenkins/jenkins_ b/plugins/jenkins/jenkins_ index edab804f..d60ef71c 100644 --- a/plugins/jenkins/jenkins_ +++ b/plugins/jenkins/jenkins_ @@ -134,7 +134,11 @@ if ( exists $ARGV[0] and $ARGV[0] eq "config" ) { my $result = `$cmd/api/json`; my $parsed = decode_json($result); foreach my $cur(@{$parsed->{'jobs'}}) { - $counts{$cur->{'color'}} += 1; + if (defined $states{$cur->{'color'}}) { + $counts{$cur->{'color'}} += 1; + } else { + warn "Ignoring unknown color " . $cur->{'color'} . "\n" + } } foreach my $status (keys %counts) {