power_status: Corrected logging string concatenation
The string concatenation in the thermal reading script is wrong, it did
not convert int to string before printing it out.
BUG=chromium-os:13866
TEST=Run a power test in http://codereview.chromium.org/6800002
Check for temperature reading in the debug log.
Change-Id: Ie2f56e52d29246f432bcc48dd0ff2cc3a1b3fe84
Signed-off-by: Simon Que <sque@chromium.org>
Review URL: http://codereview.chromium.org/6823014
diff --git a/client/cros/power_status.py b/client/cros/power_status.py
index 4510ae3..063c4b5 100644
--- a/client/cros/power_status.py
+++ b/client/cros/power_status.py
@@ -242,11 +242,11 @@
self.thermal = [ ThermalStat(self.thermal_path) ]
try:
- if self.thermal[0].temp < self.min_temp * 1000:
- self.min_temp = float(self.thermal[0].temp) / 1000
- if self.thermal[0].temp > self.max_temp * 1000:
- self.max_temp = float(self.thermal[0].temp) / 1000
- logging.info('Temperature reading: ' + self.thermal[0].temp)
+ if self.thermal[0].temp < self.min_temp:
+ self.min_temp = self.thermal[0].temp
+ if self.thermal[0].temp > self.max_temp:
+ self.max_temp = self.thermal[0].temp
+ logging.info('Temperature reading: ' + str(self.thermal[0].temp))
except:
logging.error('Could not read temperature, skipping.')