From 207291e9406ad84959e4bca0a5d547a1035deaf6 Mon Sep 17 00:00:00 2001 From: Douglas RAILLARD Date: Wed, 16 Oct 2019 11:49:14 +0100 Subject: [PATCH] module/thermal: List directories with as_root=target.is_rooted Listing thermal zones directories in sysfs fails one some system when running as non-root. Signed-off-by: Douglas RAILLARD --- devlib/module/thermal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/module/thermal.py b/devlib/module/thermal.py index f2accc9..8220b22 100644 --- a/devlib/module/thermal.py +++ b/devlib/module/thermal.py @@ -48,7 +48,7 @@ class ThermalZone(object): self.path = target.path.join(root, self.name) self.trip_points = {} - for entry in self.target.list_directory(self.path): + for entry in self.target.list_directory(self.path, as_root=target.is_rooted): re_match = re.match('^trip_point_([0-9]+)_temp', entry) if re_match is not None: self.add_trip_point(re_match.group(1))