Beispiel #1
0
 def commit(self):
     raw = self.tweaks.to_string()
     if not isinstance(raw, bytes):
         raw = raw.encode('utf-8')
     try:
         custom_tweaks = exec_tweaks(raw)
     except:
         import traceback
         error_dialog(self, _('Invalid tweaks'),
                 _('The tweaks you entered are invalid, try resetting the'
                     ' tweaks to default and changing them one by one until'
                     ' you find the invalid setting.'),
                 det_msg=traceback.format_exc(), show=True)
         raise AbortCommit('abort')
     write_custom_tweaks(custom_tweaks)
     ConfigWidgetBase.commit(self)
     return True
Beispiel #2
0
 def commit(self):
     raw = self.tweaks.to_string()
     if not isinstance(raw, bytes):
         raw = raw.encode('utf-8')
     try:
         custom_tweaks = exec_tweaks(raw)
     except:
         import traceback
         error_dialog(self, _('Invalid tweaks'),
                 _('The tweaks you entered are invalid, try resetting the'
                     ' tweaks to default and changing them one by one until'
                     ' you find the invalid setting.'),
                 det_msg=traceback.format_exc(), show=True)
         raise AbortCommit('abort')
     write_custom_tweaks(custom_tweaks)
     ConfigWidgetBase.commit(self)
     return True