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:
parent
d43862ac62
commit
46723dec16
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue