diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py index 9c38627..cb5d951 100644 --- a/auto_cpufreq/core.py +++ b/auto_cpufreq/core.py @@ -209,7 +209,7 @@ def deploy_complete_msg(): def remove_complete_msg(): print("\n" + "-" * 25 + " auto-cpufreq daemon removed " + "-" * 25 + "\n") print("auto-cpufreq successfully removed.") - + footer() def deploy_daemon(): print("\n" + "-" * 21 + " Deploying auto-cpufreq as a daemon " + "-" * 22 + "\n") diff --git a/bin/auto-cpufreq b/bin/auto-cpufreq index 7b5d09e..274bfe6 100755 --- a/bin/auto-cpufreq +++ b/bin/auto-cpufreq @@ -121,8 +121,11 @@ def main(monitor, live, daemon, install, log, debug): root_check() run("snapctl set daemon=disabled", shell=True) run("snapctl stop --disable auto-cpufreq", shell=True) - if auto_cpufreq_log_file.exists(): - auto_cpufreq_log_file.unlink() + if auto_cpufreq_log_path.exists(): + if auto_cpufreq_log_file is not None: + auto_cpufreq_log_file.close() + + auto_cpufreq_log_path.unlink() remove_complete_msg() else: root_check()