1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-02-07 05:30:44 +00:00

Merge pull request #131 from bjackman/cpufreq-error-message

cpufreq: Add possible error message for failing to set governor
This commit is contained in:
setrofim 2017-06-06 15:01:31 +01:00 committed by GitHub
commit a900f94069

View File

@ -382,7 +382,9 @@ class CpufreqModule(Module):
'cpufreq_set_all_governors {}'.format(governor),
as_root=True)
except TargetError as e:
if "echo: I/O error" in str(e):
if ("echo: I/O error" in str(e) or
"write error: Invalid argument" in str(e)):
cpus_unsupported = [c for c in self.target.list_online_cpus()
if governor not in self.list_governors(c)]
raise TargetError("Governor {} unsupported for CPUs {}".format(