Fix power module indexing

This commit is contained in:
Eric A. Miller
2013-11-21 20:36:34 -05:00
parent 834b27bdad
commit b4882285c4

View File

@@ -1285,7 +1285,7 @@ sub peth_power_status {
my $peth_power_status = {}; my $peth_power_status = {};
foreach my $i ( keys %$watts ) { foreach my $i ( keys %$watts ) {
$peth_power_status->{"$i + $offset"} = 'on'; $peth_power_status->{$i + $offset} = 'on';
} }
return $peth_power_status; return $peth_power_status;
} }
@@ -1303,7 +1303,7 @@ sub peth_power_watts {
my $total = $watts_total->{$i}; my $total = $watts_total->{$i};
next unless $total; next unless $total;
$peth_power_watts->{"$i + $offset"} = $total; $peth_power_watts->{$i + $offset} = $total;
} }
return $peth_power_watts; return $peth_power_watts;
} }