Skip to content

Commit

Permalink
add shell=True to lsmod commnad
Browse files Browse the repository at this point in the history
Fixes #740

Using shell=True is fine here because the shell command doesn't take in any user input
  • Loading branch information
shadeyg56 authored Jul 29, 2024
1 parent c7bab0e commit a14d06c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auto_cpufreq/battery_scripts/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a14d06c

Please sign in to comment.