nutups2: fix for status line without value

"upsc name" can output line "input.transfer.reason: " (key without value).
Allow it.
This commit is contained in:
Kim B. Heino 2021-04-01 12:15:33 +03:00 committed by Lars Kruse
parent d43862ac62
commit 46723dec16
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ sub read_ups_values {
for my $line (@lines) {
chomp $line;
my ($key, $value) = $line =~ m/^([^:]+):\s+(\S.*)$/;
my ($key, $value) = $line =~ m/^([^:]+):\s+(.*)$/;
$values->{$key} = $value;
}
return $values;