battery: add shell=True to lsmod call

systemd needs shell=True otherwise it returns "FileNotFoundError: [Errno 2] No such file or directory: 'lsmod'"
This commit is contained in:
shadeyg56 2024-03-18 18:37:47 -05:00
parent 971f40f0ca
commit 215026ad43
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ from auto_cpufreq.battery_scripts.ideapad_laptop import ideapad_laptop_setup, id
def lsmod(module):
output = subprocess.run(
['lsmod'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
['lsmod'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, shell=True)
if module in output.stdout:
return True
else: