aPriori.DNS.check_input_stringΒΆ

aPriori.DNS.check_input_string(input_string, valid_strings, input_name)ΒΆ

Checks if the value of input_string is contained in the list valid_strings. If the result is positive, returns None, if the result is negative raises an error

Parameters:
  • input_string (string) – Is the string that must be checked

  • valid_strings (list of strings) – Is the list of valid strings

  • input_name (string) – Is the name of the parameter that we are checking

Returns:

  • None

  • NOTES

  • β€”β€”-

  • Example of output if the function finds an error

  • ValueError (Invalid parameter mode β€˜mode1’. Valid options are:) –

    • mode_1

    • mode_2

    • mode_3