From 9fcca2503127391409f3d613be6fe0fec8f1719c Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Thu, 31 Jan 2019 11:43:38 +0000 Subject: [PATCH] hwmon: Robustify hwmon scan The hwmon module reads sysfs entries from the target during init. Since this step is known to be fragile on some hosts, make sure to specify tar=True when calling target.read_tree_values() to improve the chances of reading the data properly. Signed-off-by: Quentin Perret --- devlib/module/hwmon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/module/hwmon.py b/devlib/module/hwmon.py index 7145ae5..3ecc55c 100644 --- a/devlib/module/hwmon.py +++ b/devlib/module/hwmon.py @@ -137,7 +137,7 @@ class HwmonModule(Module): self.scan() def scan(self): - values_tree = self.target.read_tree_values(self.root, depth=3) + values_tree = self.target.read_tree_values(self.root, depth=3, tar=True) for entry_id, fields in values_tree.items(): path = self.target.path.join(self.root, entry_id) name = fields.pop('name', None)