check_junos_bgp: Fixed check for non-existing attributes.

This commit is contained in:
Sebastian Harl 2012-10-01 11:29:24 +02:00
parent 2912192f3d
commit 20214655e0

View file

@ -515,9 +515,9 @@ sub get_peer_element
}
$e = $peer->getElementsByTagName($elem);
if (! $e) {
if ((! $e) || (! $e->item(0))) {
print STDERR "Attribute '$elem' not found for peer.\n";
verbose(3, "Element was: " . Dumper($elem));
verbose(3, "Peer was: " . Dumper($peer));
return;
}