Commit 9426947d authored by nednguyen's avatar nednguyen Committed by Commit bot

Add warning log when sysfs_power_monitor fail to read power frequency.

BUG=416489

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

Cr-Commit-Position: refs/heads/master@{#296727}
parent 203f6295
......@@ -3,6 +3,7 @@
# found in the LICENSE file.
import collections
import logging
import os
import re
......@@ -106,7 +107,10 @@ class SysfsPowerMonitor(power_monitor.PowerMonitor):
CPU_PATH, cpu, 'cpufreq/stats/time_in_state')
try:
stats[cpu] = self._platform.GetFileContents(cpu_freq_path)
except Exception:
except Exception as e:
logging.warning(
'Cannot read cpu frequency times in %s due to error: %s' %
(cpu_freq_path, e.message))
stats[cpu] = None
return stats
......
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