acpi for some reason can return multiple batteries even though there is only one
This commit is contained in:
parent
59455c5959
commit
6d337abc8e
|
@ -9,7 +9,7 @@ LOG_FILE_PATH = "/tmp/battery_status.log"
|
|||
def get_acpi():
|
||||
""" get acpi data as a sting """
|
||||
acpi_raw = subprocess.run(["acpi"], capture_output=True, check=False)
|
||||
acpi_string = acpi_raw.stdout.decode().strip()
|
||||
acpi_string = acpi_raw.stdout.decode().strip().split('\n')[0]
|
||||
return acpi_string
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue