got rid of some warnings for undef models
This commit is contained in:
@@ -157,7 +157,9 @@ sub os_ver {
|
|||||||
sub model {
|
sub model {
|
||||||
my $hp = shift;
|
my $hp = shift;
|
||||||
my $id = $hp->id();
|
my $id = $hp->id();
|
||||||
|
return undef unless defined $id;
|
||||||
my $model = &SNMP::translateObj($id);
|
my $model = &SNMP::translateObj($id);
|
||||||
|
return $id unless defined $model;
|
||||||
|
|
||||||
$model =~ s/^hpswitch//i;
|
$model =~ s/^hpswitch//i;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user