Skip to content

Commit 27a2f97

Browse files
author
Alex W Baulé
committed
1 parent 49aba75 commit 27a2f97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

psutil/_pslinux.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,8 +1443,9 @@ def sensors_fans():
14431443
except (IOError, OSError) as err:
14441444
debug(err)
14451445
continue
1446+
fallback_label = os.path.split(base)[1]
14461447
unit_name = cat(os.path.join(os.path.dirname(base), 'name')).strip()
1447-
label = cat(base + '_label', fallback='').strip()
1448+
label = cat(base + '_label', fallback=f'{fallback_label}').strip()
14481449
ret[unit_name].append(_common.sfan(label, current))
14491450

14501451
return dict(ret)

0 commit comments

Comments
 (0)