check_junos_bgp: Fixed check for non-existing attributes.
This commit is contained in:
parent
2912192f3d
commit
20214655e0
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue