checked for empty id in model()
This commit is contained in:
@@ -149,6 +149,12 @@ sub serial {
|
|||||||
sub model {
|
sub model {
|
||||||
my $l3 = shift;
|
my $l3 = shift;
|
||||||
my $id = $l3->id();
|
my $id = $l3->id();
|
||||||
|
|
||||||
|
unless (defined $id){
|
||||||
|
print " SNMP::Info::Layer3::model() - Device does not support sysObjectID\n" if $DEBUG;
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
my $model = &SNMP::translateObj($id);
|
my $model = &SNMP::translateObj($id);
|
||||||
|
|
||||||
$model =~ s/^cisco//i;
|
$model =~ s/^cisco//i;
|
||||||
|
|||||||
Reference in New Issue
Block a user