From 215026ad43a5398cbe2b5e485514feafba8aadd7 Mon Sep 17 00:00:00 2001 From: shadeyg56 Date: Mon, 18 Mar 2024 18:37:47 -0500 Subject: [PATCH] battery: add shell=True to lsmod call systemd needs shell=True otherwise it returns "FileNotFoundError: [Errno 2] No such file or directory: 'lsmod'" --- auto_cpufreq/battery_scripts/battery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto_cpufreq/battery_scripts/battery.py b/auto_cpufreq/battery_scripts/battery.py index 7ebb9d0e..904aa630 100644 --- a/auto_cpufreq/battery_scripts/battery.py +++ b/auto_cpufreq/battery_scripts/battery.py @@ -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: