1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-06 10:50:51 +01:00

module/sched: Fix None check

As mentioned in the previous commit, CPU numbers would be passed to
SchedProcFSData's __init__() (instead of a proper sysfs path). When
done with CPU0, that path would be evaluated as False and the code
would carry on with the default path, which was quite confusing.

This has now been fixed (and 0 isn't such a great path to give
anyway), nevertheless this check should just catter to None.
This commit is contained in:
Valentin Schneider 2019-07-09 14:10:55 +01:00 committed by Marc Bonnici
parent b8f7b24790
commit ada318f27b

View File

@ -241,7 +241,7 @@ class SchedProcFSData(SchedProcFSNode):
return False
def __init__(self, target, path=None):
if not path:
if path is None:
path = self.sched_domain_root
procfs = target.read_tree_values(path, depth=self._read_depth)