Skip to content

Commit 5f54579

Browse files
authored
Update sensors_librehardwaremonitor.py
1 parent 6726bd0 commit 5f54579

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

library/sensors/sensors_librehardwaremonitor.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -448,16 +448,16 @@ def virtual_free() -> int: # In bytes
448448
# This is because LHM is a hardware-oriented library, whereas used/free/total space is for partitions, not disks
449449
class Disk(sensors.Disk):
450450
@staticmethod
451-
def disk_usage_percent() -> float:
452-
return psutil.disk_usage("/").percent
451+
def disk_usage_percent(path) -> float:
452+
return psutil.disk_usage(path).percent
453453

454454
@staticmethod
455-
def disk_used() -> int: # In bytes
456-
return psutil.disk_usage("/").used
455+
def disk_used(path) -> int: # In bytes
456+
return psutil.disk_usage(path).used
457457

458458
@staticmethod
459-
def disk_free() -> int: # In bytes
460-
return psutil.disk_usage("/").free
459+
def disk_free(path) -> int: # In bytes
460+
return psutil.disk_usage(path).free
461461

462462

463463
class Net(sensors.Net):

0 commit comments

Comments
 (0)