Commit 86c176b0 authored by dtu's avatar dtu Committed by Commit bot

[telemetry] Fix MSR CanMonitorPower().

Ah, the dangers of dynamic typing and implicit type conversion.
Typo in https://codereview.chromium.org/577893003

BUG=336556, 336558
TEST=None.
TBR=thestig@chromium.org

Review URL: https://codereview.chromium.org/605633002

Cr-Commit-Position: refs/heads/master@{#296657}
parent 61b4d4b0
......@@ -13,7 +13,9 @@ class PlatformBackendTest(unittest.TestCase):
def testPowerMonitoringSync(self):
# Tests that the act of monitoring power doesn't blow up.
platform = platform_module.GetHostPlatform()
if not platform.CanMonitorPower():
can_monitor_power = platform.CanMonitorPower()
self.assertIsInstance(can_monitor_power, bool)
if not can_monitor_power:
logging.warning('Test not supported on this platform.')
return
......
......@@ -123,6 +123,7 @@ class MsrPowerMonitor(power_monitor.PowerMonitor):
except OSError as e:
logging.info('Cannot monitor power: %s' % e)
return False
return True
def _WinCanMonitorPower(self):
family, model = map(int, re.match('.+ Family ([0-9]+) Model ([0-9]+)',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment