Skip to content

Commit

Permalink
refactor: remove unnecessary code lines for clarity and maintainability
Browse files Browse the repository at this point in the history
  • Loading branch information
geragio committed Nov 4, 2024
1 parent d45a318 commit 1f342d7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions auto_cpufreq/power_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:")
Expand Down Expand Up @@ -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:")
Expand Down

0 comments on commit 1f342d7

Please sign in to comment.