Fix "Unable to remove via --remove option for Snap package" (Close #161)
This commit is contained in:
parent
3e6d1314b3
commit
5e38ada748
|
@ -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")
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue