add additional error catching to GUI

This commit is contained in:
shadeyg56 2023-08-23 16:53:05 -05:00
parent df6192298e
commit 86fd056687

View File

@ -266,6 +266,8 @@ class DaemonNotRunningView(Gtk.Box):
result = run("pkexec auto-cpufreq --install", shell=True, stdout=PIPE, stderr=PIPE)
if result.stderr.decode() == PKEXEC_ERROR:
raise Exception("Authorization was cancelled")
elif result.stderr is not None:
raise Exception(result.stderr.decode())
dialog = Gtk.MessageDialog(
transient_for=parent,
message_type=Gtk.MessageType.INFO,