fix process aix local

This commit is contained in:
garnier-quentin 2019-09-12 17:47:25 +02:00
parent 5dbf297eb8
commit eb5e5f87ea
2 changed files with 28 additions and 20 deletions

View File

@ -140,8 +140,10 @@ sub run {
} }
$self->manage_selection(); $self->manage_selection();
$self->{output}->output_add(severity => 'OK', $self->{output}->output_add(
short_msg => sprintf("No error found%s.", $extra_message)); severity => 'OK',
short_msg => sprintf("No error found%s.", $extra_message)
);
my $total_error = 0; my $total_error = 0;
foreach my $errpt_error (sort(keys %{$self->{result}})) { foreach my $errpt_error (sort(keys %{$self->{result}})) {
@ -173,8 +175,10 @@ sub run {
} }
if ($total_error != 0) { if ($total_error != 0) {
$self->{output}->output_add(severity => 'critical', $self->{output}->output_add(
short_msg => sprintf("%s error(s) found(s)%s", $total_error, $extra_message)); severity => 'critical',
short_msg => sprintf("%s error(s) found(s)%s", $total_error, $extra_message)
);
} }
$self->{output}->display(); $self->{output}->display();

View File

@ -129,6 +129,10 @@ sub get_time_seconds {
my $total_seconds_elapsed = $seconds + ($min * 60); my $total_seconds_elapsed = $seconds + ($min * 60);
if (defined($lpart)) { if (defined($lpart)) {
my ($day, $hour) = split /-/, $lpart; my ($day, $hour) = split /-/, $lpart;
if (!defined($hour)) {
$hour = $day;
$day = undef;
}
if (defined($hour)) { if (defined($hour)) {
$total_seconds_elapsed += ($hour * 60 * 60); $total_seconds_elapsed += ($hour * 60 * 60);
} }