handle snmp discovery without desc

This commit is contained in:
Colin Gagnaire 2019-10-11 10:23:40 +02:00
parent bdfff89f5f
commit 44da540da2
1 changed files with 1 additions and 0 deletions

View File

@ -99,6 +99,7 @@ my $lookup_type = [
sub define_type {
my ($self, %options) = @_;
return "unknown" unless (defined($options{desc}) && $options{desc} ne '');
foreach (@$lookup_type) {
if ($options{desc} =~ /$_->{re}/) {
return $_->{type};