This commit is contained in:
qgarnier 2014-03-22 19:16:37 +01:00
parent 7e0fac7136
commit 54771ff030
6 changed files with 7 additions and 7 deletions

View File

@ -217,7 +217,7 @@ sub reload_cache {
$datas->{"device_" . $1} = $result->{$key};
}
if (scalar(keys %$datas) <= 0) {
if (scalar(@{$datas->{all_ids}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "Can't construct cache...");
$self->{output}->option_exit();
}

View File

@ -200,7 +200,7 @@ sub reload_cache {
$datas->{'dskPath_' . $1} = $self->{output}->to_utf8($result->{$key});
}
if (scalar(keys %$datas) <= 0) {
if (scalar(@{$datas->{all_ids}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "Can't construct cache...");
$self->{output}->option_exit();
}

View File

@ -146,7 +146,7 @@ sub reload_cache {
$datas->{'dskPath_' . $1} = $self->{output}->to_utf8($result->{$key});
}
if (scalar(keys %$datas) <= 0) {
if (scalar(@{$datas->{all_ids}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "Can't construct cache...");
$self->{output}->option_exit();
}

View File

@ -364,7 +364,7 @@ sub reload_cache {
$datas->{$self->{option_results}->{oid_filter} . "_" . $1} = $self->{output}->to_utf8($result->{$key});
}
if (scalar(keys %$datas) <= 0) {
if (scalar(@{$datas->{all_ids}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "Can't construct cache...");
$self->{output}->option_exit();
}

View File

@ -259,7 +259,7 @@ sub reload_cache {
$datas->{$self->{option_results}->{oid_filter} . "_" . $1} = $self->{output}->to_utf8($result->{$key});
}
if (scalar(keys %$datas) <= 0) {
if (scalar(@{$datas->{all_ids}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "Can't construct cache...");
$self->{output}->option_exit();
}

View File

@ -307,8 +307,8 @@ sub reload_cache {
push @{$datas->{all_ids}}, $1;
$datas->{$self->{option_results}->{oid_filter} . "_" . $1} = $self->{output}->to_utf8($result->{$key});
}
if (scalar(keys %$datas) <= 0) {
if (scalar(@{$datas->{all_ids}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "Can't construct cache...");
$self->{output}->option_exit();
}