mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-22 21:24:47 +02:00
add shell=True to lsmod commnad
Fixes #740 Using shell=True is fine here because the shell command doesn't take in any user input
This commit is contained in:
parent
c7bab0e36f
commit
a14d06ce94
@ -5,7 +5,7 @@ from auto_cpufreq.battery_scripts.ideapad_acpi import ideapad_acpi_print_thresho
|
|||||||
from auto_cpufreq.battery_scripts.ideapad_laptop import ideapad_laptop_print_thresholds, ideapad_laptop_setup
|
from auto_cpufreq.battery_scripts.ideapad_laptop import ideapad_laptop_print_thresholds, ideapad_laptop_setup
|
||||||
from auto_cpufreq.battery_scripts.thinkpad import thinkpad_print_thresholds, thinkpad_setup
|
from auto_cpufreq.battery_scripts.thinkpad import thinkpad_print_thresholds, thinkpad_setup
|
||||||
|
|
||||||
def lsmod(module): return module in run(['lsmod'], stdout=PIPE, stderr=PIPE, text=True).stdout
|
def lsmod(module): return module in run(['lsmod'], stdout=PIPE, stderr=PIPE, text=True, shell=True).stdout
|
||||||
|
|
||||||
def battery_get_thresholds():
|
def battery_get_thresholds():
|
||||||
if lsmod("ideapad_acpi"): ideapad_acpi_print_thresholds()
|
if lsmod("ideapad_acpi"): ideapad_acpi_print_thresholds()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user