refactor: remove unnecessary code lines for clarity and maintainability ()

This commit is contained in:
Giovanni Geraci 2024-11-04 17:27:11 +01:00 committed by GitHub
parent d45a31853c
commit 18a3a93f62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 6 deletions
auto_cpufreq

View File

@ -119,9 +119,7 @@ def gnome_power_svc_enable():
try:
print("* Enabling GNOME power profiles\n")
call(["systemctl", "unmask", "power-profiles-daemon"])
call(["systemctl", "start", "power-profiles-daemon"])
call(["systemctl", "enable", "power-profiles-daemon"])
call(["systemctl", "daemon-reload"])
call(["systemctl", "enable", "--now", "power-profiles-daemon"])
except:
print("\nUnable to enable GNOME power profiles")
print("If this causes any problems, please submit an issue:")
@ -221,10 +219,8 @@ def disable_power_profiles_daemon():
# always disable power-profiles-daemon
try:
print("\n* Disabling GNOME power profiles")
call(["systemctl", "stop", "power-profiles-daemon"])
call(["systemctl", "disable", "power-profiles-daemon"])
call(["systemctl", "disable", "--now", "power-profiles-daemon"])
call(["systemctl", "mask", "power-profiles-daemon"])
call(["systemctl", "daemon-reload"])
except:
print("\nUnable to disable GNOME power profiles")
print("If this causes any problems, please submit an issue:")