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):
|
def lsmod(module):
|
||||||
output = subprocess.run(
|
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:
|
if module in output.stdout:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue