Skip to content

Commit

Permalink
battery: add shell=True to lsmod call
Browse files Browse the repository at this point in the history
systemd needs shell=True otherwise it returns "FileNotFoundError: [Errno 2] No such file or directory: 'lsmod'"
  • Loading branch information
shadeyg56 committed Mar 18, 2024
1 parent 971f40f commit 215026a
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 @@ -8,7 +8,7 @@

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:
Expand Down

0 comments on commit 215026a

Please sign in to comment.