def validate(self): ans = super(RuleEdit, self).validate() if ans: rule = self.rule if 'glob' in rule['match_type']: try: compile_glob(rule['query']) except Exception: error_dialog(self, _('Query invalid'), _( '%s is not a valid glob expression') % rule['query'], show=True) return False return ans
def validate(self): ans = super().validate() if ans: rule = self.rule if 'glob' in rule['match_type']: try: compile_glob(rule['query']) except Exception: error_dialog(self, _('Query invalid'), _( '%s is not a valid glob expression') % rule['query'], show=True) return False return ans