Ejemplo n.º 1
0
 def validate_detector_params(self):
     """Check if all the parameters given to the detector make sens."""
     if self._change_type_name not in constants.CHANGE_TYPES.values():
         raise exception.DetectorValidationException(
             ('Change type {} is not in not valid. Accepted'
              ' change types are {}').format(
                  self._change_type_name, constants.CHANGE_TYPES.keys()))
Ejemplo n.º 2
0
 def validate_detector_params(self):
     """Check if all the parameters given to the detector make sens."""
     super(BasePatternBaseDetector, self).validate_detector_params()
     if not isinstance(self._pattern, str):
         raise exception.DetectorValidationException(
             ('Patter: {} is not valid.'
              'it must be specified and of type string').format(
                  self._pattern))
Ejemplo n.º 3
0
    def validate_detector_params(self) -> NoReturn:
        """Check if all the parameters given to the detector make sens."""
        super().validate_detector_params()

        if self. _compiled_regex is None:
            raise exception.DetectorValidationException(
                ('Patter: {} is not valid regex.'
                 'it must be specified and compliant').format(self._pattern))
Ejemplo n.º 4
0
 def validate_detector_params(self) -> NoReturn:
     """Check if all the parameters given to the detector make sens."""
     super().validate_detector_params()
     if not isinstance(self._case_sensitive, bool):
         raise exception.DetectorValidationException(
             ('case_sensitive: {} is not valid.'
              'it must be of type bool').format(
                  self._case_sensitive))