Skip to content

Commit 4c7a885

Browse files
author
Alex W. Baulé
authored
using basename to extract name
1 parent a0da66f commit 4c7a885

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

psutil/_pslinux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ def sensors_fans():
14431443
except (IOError, OSError) as err:
14441444
debug(err)
14451445
continue
1446-
fallback_label = os.path.split(base)[1]
1446+
fallback_label = os.path.basename(base)
14471447
unit_name = cat(os.path.join(os.path.dirname(base), 'name')).strip()
14481448
label = cat(base + '_label', fallback=f'{fallback_label}').strip()
14491449
ret[unit_name].append(_common.sfan(label, current))

0 commit comments

Comments
 (0)