diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py index d2a21e4..2dcdff1 100644 --- a/auto_cpufreq/core.py +++ b/auto_cpufreq/core.py @@ -96,7 +96,6 @@ def get_override(): return "default" def set_override(override): - root_check() # Calling root_check inside if and elif might be too verbose and is susceptible to bugs in future if override in ["powersave", "performance"]: with open(governor_override_state, "wb") as store: pickle.dump(override, store) diff --git a/bin/auto-cpufreq b/bin/auto-cpufreq index d3880da..98c3be7 100755 --- a/bin/auto-cpufreq +++ b/bin/auto-cpufreq @@ -45,7 +45,8 @@ def main(config, daemon, debug, install, remove, live, log, monitor, stats, vers # set governor override unless None or invalid if force is not None: not_running_daemon_check() - set_override(force) + root_check() # Calling root_check before set_override as it will require sudo access + set_override(force) # Calling set override, only if force has some values if len(sys.argv) == 1: