@@ -87,7 +87,7 @@ def init_acpi_call(self):
8787 self .is_root = (self .shell_exec ("whoami" )[1 ].find ("root" ) != - 1 )
8888 if not self .is_root :
8989 print ("Bash shell is NOT root. Disabling ACPI methods..." )
90- popup = QMessageBox .information (self ,"Warning" ,"No root access. Power related functions will not work, and will not be displayed." )
90+ popup = QMessageBox .warning (self ,"Warning" ,"No root access. Power related functions will not work, and will not be displayed." )
9191 return
9292
9393 print ("Sh shell is root. Enabling ACPI methods..." )
@@ -265,15 +265,19 @@ def combobox_choice(self):
265265 self .settings .setValue ("Action" , self .combobox_mode .currentText ())
266266
267267 def apply_leds (self ):
268- if self .settings .value ("Action" , "Static Color" ) == "Static Color" :
269- self .apply_static ()
270- elif self .settings .value ("Action" , "Static Color" ) == "Morph" :
271- self .apply_morph ()
272- elif self .settings .value ("Action" , "Static Color" ) == "Color and Morph" :
273- self .apply_color_and_morph ()
274- else : #Off
275- self .remove_animation ()
276-
268+ try :
269+ if self .settings .value ("Action" , "Static Color" ) == "Static Color" :
270+ self .apply_static ()
271+ elif self .settings .value ("Action" , "Static Color" ) == "Morph" :
272+ self .apply_morph ()
273+ elif self .settings .value ("Action" , "Static Color" ) == "Color and Morph" :
274+ self .apply_color_and_morph ()
275+ else : #Off
276+ self .remove_animation ()
277+ except Exception as err :
278+ QMessageBox .warning (self ,"Error" ,f"Cannot apply LED settings:\n \n { err .__class__ .__name__ } : { err } " )
279+ raise err
280+
277281 def combobox_power (self ):
278282 self .fan1_boost .setValue (0 )
279283 self .fan2_boost .setValue (0 )
0 commit comments