def accept(self): settings = CompatSettings() cache = self.cacheBox.currentText() if cache in self._caches: self._caches.remove(cache) self._caches.insert(0, cache) settings.setValue('cachehosts', self._caches) settings.setValue('keyprefix', self.prefixEdit.text()) QDialog.accept(self)
def accept(self): if self.simpleTime.isChecked(): try: get_time_and_interval(self.simpleTimeSpec.text()) except ValueError: self.showSimpleHelp() return if self.customY.isChecked(): try: float(self.customYFrom.text()) except ValueError: self.showError('You have to input valid y axis limits.') return try: float(self.customYTo.text()) except ValueError: self.showError('You have to input valid y axis limits.') return return QDialog.accept(self)