Skip to content

Commit

Permalink
make perlcritic happy
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Fischl <[email protected]>
  • Loading branch information
antonfischl1980 committed Apr 1, 2022
1 parent dff3eb3 commit 8774004
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions check_portage_age.pl
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ END
$np->nagios_die("Unable to identify portdir");
}

open TIMESTAMP, ($portdir . "/metadata/timestamp.chk")
open my $TIMESTAMP_FH, "<:encoding(UTF-8)", ($portdir . "/metadata/timestamp.chk")
or $np->nagios_die("Unable to open $portdir/metadata/timestamp.chk");
chomp(my $timestamp_str = readline(TIMESTAMP));
close(TIMESTAMP);
chomp(my $timestamp_str = readline($TIMESTAMP_FH));
close($TIMESTAMP_FH);

my $timestamp = str2time($timestamp_str);
my $difference = time() - $timestamp;
Expand Down

0 comments on commit 8774004

Please sign in to comment.