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:
parent
971f40f0ca
commit
215026ad43
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue