From a14d06ce946a87928790dbd3fb4d69fcda51f2e3 Mon Sep 17 00:00:00 2001 From: shadeyg56 <31134255+shadeyg56@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:01:00 -0500 Subject: [PATCH] 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 --- auto_cpufreq/battery_scripts/battery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto_cpufreq/battery_scripts/battery.py b/auto_cpufreq/battery_scripts/battery.py index 2e85c6a4..cbec71a5 100644 --- a/auto_cpufreq/battery_scripts/battery.py +++ b/auto_cpufreq/battery_scripts/battery.py @@ -5,7 +5,7 @@ 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 -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(): if lsmod("ideapad_acpi"): ideapad_acpi_print_thresholds()