1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-02-24 21:47:50 +00:00

module/thermal: Gracefully handle unexpected sysfs names

Instead of raising an exception, log an warning and carry on.
This commit is contained in:
Douglas RAILLARD 2019-06-05 15:06:48 +01:00 committed by Marc Bonnici
parent f2bc5dbc14
commit 8343794d34

@ -88,6 +88,9 @@ class ThermalModule(Module):
for entry in target.list_directory(self.thermal_root):
re_match = re.match('^(thermal_zone|cooling_device)([0-9]+)', entry)
if not re_match:
self.logger.warning('unknown thermal entry: %s', entry)
continue
if re_match.group(1) == 'thermal_zone':
self.add_thermal_zone(re_match.group(2))