mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-25 05:57:51 +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:
parent
f2bc5dbc14
commit
8343794d34
@ -88,6 +88,9 @@ class ThermalModule(Module):
|
|||||||
|
|
||||||
for entry in target.list_directory(self.thermal_root):
|
for entry in target.list_directory(self.thermal_root):
|
||||||
re_match = re.match('^(thermal_zone|cooling_device)([0-9]+)', entry)
|
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':
|
if re_match.group(1) == 'thermal_zone':
|
||||||
self.add_thermal_zone(re_match.group(2))
|
self.add_thermal_zone(re_match.group(2))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user