Skip to content

Commit

Permalink
Following lm-sensors with fan names
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwbaule committed Jun 6, 2023
1 parent 49aba75 commit 27a2f97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion psutil/_pslinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -1443,8 +1443,9 @@ def sensors_fans():
except (IOError, OSError) as err:
debug(err)
continue
fallback_label = os.path.split(base)[1]
unit_name = cat(os.path.join(os.path.dirname(base), 'name')).strip()
label = cat(base + '_label', fallback='').strip()
label = cat(base + '_label', fallback=f'{fallback_label}').strip()
ret[unit_name].append(_common.sfan(label, current))

return dict(ret)
Expand Down

0 comments on commit 27a2f97

Please sign in to comment.