mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-04-08 17:05:56 +02:00
Repare check_output error
This commit is contained in:
parent
af95428d4d
commit
caec0449ba
@ -33,6 +33,6 @@ def ideapad_acpi_print_thresholds():
|
||||
print(f"battery count = {len(batteries)}")
|
||||
for bat in batteries:
|
||||
try:
|
||||
print(bat, "start threshold =", check_output(f"cat {POWER_SUPPLY_DIR}{bat}/charge_start_threshold"))
|
||||
print(bat, "stop threshold =", check_output(f"cat {POWER_SUPPLY_DIR}{bat}/charge_stop_threshold"))
|
||||
print(bat, "start threshold =", check_output(["cat", POWER_SUPPLY_DIR+bat+"/charge_start_threshold"]))
|
||||
print(bat, "stop threshold =", check_output(["cat", POWER_SUPPLY_DIR+bat+"/charge_stop_threshold"]))
|
||||
except Exception as e: print(f"ERROR: failed to read battery {bat} thresholds:", repr(e))
|
||||
|
@ -64,6 +64,6 @@ def ideapad_laptop_print_thresholds():
|
||||
print(f"battery count = {len(batteries)}")
|
||||
for bat in batteries:
|
||||
try:
|
||||
print(bat, "start threshold =", check_output(f"cat {POWER_SUPPLY_DIR}{bat}/charge_start_threshold"))
|
||||
print(bat, "stop threshold =", check_output(f"cat {POWER_SUPPLY_DIR}{bat}/charge_stop_threshold"))
|
||||
print(bat, "start threshold =", check_output(["cat", POWER_SUPPLY_DIR+bat+"/charge_start_threshold"]))
|
||||
print(bat, "stop threshold =", check_output(["cat", POWER_SUPPLY_DIR+bat+"/charge_stop_threshold"]))
|
||||
except Exception as e: print(f"ERROR: failed to read battery {bat} thresholds:", repr(e))
|
||||
|
@ -34,6 +34,6 @@ def thinkpad_print_thresholds():
|
||||
print(f"battery count = {len(batteries)}")
|
||||
for bat in batteries:
|
||||
try:
|
||||
print(bat, "start threshold =", check_output(f"cat {POWER_SUPPLY_DIR}{bat}/charge_start_threshold"))
|
||||
print(bat, "stop threshold =", check_output(f"cat {POWER_SUPPLY_DIR}{bat}/charge_stop_threshold"))
|
||||
print(bat, "start threshold =", check_output(["cat", POWER_SUPPLY_DIR+bat+"/charge_start_threshold"]))
|
||||
print(bat, "stop threshold =", check_output(["cat", POWER_SUPPLY_DIR+bat+"/charge_stop_threshold"]))
|
||||
except Exception as e: print(f"ERROR: failed to read battery {bat} thresholds:", repr(e))
|
||||
|
Loading…
x
Reference in New Issue
Block a user