From cb887e59334c7dd86a5deee7ecf8071e5cba845b Mon Sep 17 00:00:00 2001 From: Angel-Karasu Date: Wed, 31 Jul 2024 13:27:38 +0200 Subject: [PATCH] Change code location for the message when using --config-reload only --- auto_cpufreq/bin/auto_cpufreq.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auto_cpufreq/bin/auto_cpufreq.py b/auto_cpufreq/bin/auto_cpufreq.py index 3020d71..0f86d06 100755 --- a/auto_cpufreq/bin/auto_cpufreq.py +++ b/auto_cpufreq/bin/auto_cpufreq.py @@ -31,8 +31,6 @@ from auto_cpufreq.power_helper import * @click.option("--version", is_flag=True, help="Show currently installed version") @click.option("--donate", is_flag=True, help="Support the project") def main(monitor, live, daemon, install, update, remove, force, config, config_reload, stats, get_state, completions, debug, version, donate): - if config_reload and not (monitor or live or daemon): print('Error: Use --config-reload command with --monitor|live|daemon') - if len(sys.argv) == 1: print("\n" + "-" * 32 + " auto-cpufreq " + "-" * 33 + "\n") print("Automatic CPU speed & power optimizer for Linux") @@ -48,6 +46,8 @@ def main(monitor, live, daemon, install, update, remove, force, config, config_r not_running_daemon_check() 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 config_reload and not (monitor or live or daemon): print('Error: Use --config-reload command with --monitor|live|daemon') if monitor: root_check()