mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-24 06:05:08 +02:00
removed blank lines in battery info
This commit is contained in:
parent
4425c32bd0
commit
397ab2cf88
@ -49,15 +49,15 @@ def ideapad_acpi_print_thresholds():
|
||||
battery_count = len([name for name in os.listdir(
|
||||
"/sys/class/power_supply/") if name.startswith('BAT')])
|
||||
print("\n-------------------------------- Battery Info ---------------------------------\n")
|
||||
print(f"battery count = {battery_count}\n")
|
||||
print(f"battery count = {battery_count}")
|
||||
for b in range(battery_count):
|
||||
try:
|
||||
with open(f'/sys/class/power_supply/BAT{b}/charge_start_threshold', 'r') as f:
|
||||
print(f'battery{b} start threshold = {f.read()}')
|
||||
print(f'battery{b} start threshold = {f.read()}', end="")
|
||||
f.close()
|
||||
|
||||
with open(f'/sys/class/power_supply/BAT{b}/charge_stop_threshold', 'r') as f:
|
||||
print(f'battery{b} stop threshold = {f.read()}')
|
||||
print(f'battery{b} stop threshold = {f.read()}', end="")
|
||||
f.close()
|
||||
|
||||
except Exception:
|
||||
|
@ -86,15 +86,15 @@ def ideapad_laptop_print_thresholds():
|
||||
battery_count = len([name for name in os.listdir(
|
||||
"/sys/class/power_supply/") if name.startswith('BAT')])
|
||||
print("\n-------------------------------- Battery Info ---------------------------------\n")
|
||||
print(f"battery count = {battery_count}\n")
|
||||
print(f"battery count = {battery_count}")
|
||||
for b in range(battery_count):
|
||||
try:
|
||||
with open(f'/sys/class/power_supply/BAT{b}/charge_start_threshold', 'r') as f:
|
||||
print(f'battery{b} start threshold = {f.read()}')
|
||||
print(f'battery{b} start threshold = {f.read()}', end="")
|
||||
f.close()
|
||||
|
||||
with open(f'/sys/class/power_supply/BAT{b}/charge_stop_threshold', 'r') as f:
|
||||
print(f'battery{b} stop threshold = {f.read()}')
|
||||
print(f'battery{b} stop threshold = {f.read()}', end="")
|
||||
f.close()
|
||||
|
||||
except Exception:
|
||||
|
@ -49,15 +49,15 @@ def thinkpad_print_thresholds():
|
||||
battery_count = len([name for name in os.listdir(
|
||||
"/sys/class/power_supply/") if name.startswith('BAT')])
|
||||
print("\n-------------------------------- Battery Info ---------------------------------\n")
|
||||
print(f"battery count = {battery_count}\n")
|
||||
print(f"battery count = {battery_count}")
|
||||
for b in range(battery_count):
|
||||
try:
|
||||
with open(f'/sys/class/power_supply/BAT{b}/charge_start_threshold', 'r') as f:
|
||||
print(f'battery{b} start threshold = {f.read()}')
|
||||
print(f'battery{b} start threshold = {f.read()}', end="")
|
||||
f.close()
|
||||
|
||||
with open(f'/sys/class/power_supply/BAT{b}/charge_stop_threshold', 'r') as f:
|
||||
print(f'battery{b} stop threshold = {f.read()}')
|
||||
print(f'battery{b} stop threshold = {f.read()}', end="")
|
||||
f.close()
|
||||
|
||||
except Exception:
|
||||
|
Loading…
x
Reference in New Issue
Block a user