mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-28 16:14:14 +02:00
add additional error catching to GUI
This commit is contained in:
parent
df6192298e
commit
86fd056687
@ -266,6 +266,8 @@ class DaemonNotRunningView(Gtk.Box):
|
|||||||
result = run("pkexec auto-cpufreq --install", shell=True, stdout=PIPE, stderr=PIPE)
|
result = run("pkexec auto-cpufreq --install", shell=True, stdout=PIPE, stderr=PIPE)
|
||||||
if result.stderr.decode() == PKEXEC_ERROR:
|
if result.stderr.decode() == PKEXEC_ERROR:
|
||||||
raise Exception("Authorization was cancelled")
|
raise Exception("Authorization was cancelled")
|
||||||
|
elif result.stderr is not None:
|
||||||
|
raise Exception(result.stderr.decode())
|
||||||
dialog = Gtk.MessageDialog(
|
dialog = Gtk.MessageDialog(
|
||||||
transient_for=parent,
|
transient_for=parent,
|
||||||
message_type=Gtk.MessageType.INFO,
|
message_type=Gtk.MessageType.INFO,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user