Skip to content

Commit

Permalink
Allow for empty strings and thus unsetting the option
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Oct 25, 2023
1 parent 1fd8330 commit 3431e51
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ert/config/queue_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,15 @@ def _validate_queue_options(
)
if (
option_name in float_options[queue_type]
and re.match(r"\d+(\.\d+)", option_value) is None
and re.match(r"(?:\d+(\.\d+)?)?", option_value) is None
):
raise ConfigValidationError(
f"The value '{option_value}' is not valid integer or float"
f" for the {queue_type} option {option_name}."
)
if (
option_name in positive_int_options[queue_type]
and re.match(r"\d+", option_value) is None
and re.match(r"(?:\d+)?", option_value) is None
):
raise ConfigValidationError(
f"The value '{option_value}' is not valid positive integer "
Expand All @@ -250,6 +250,7 @@ def _validate_queue_options(
if option_name in bool_options[queue_type] and not option_value in [
"TRUE",
"FALSE",
"",
]:
raise ConfigValidationError(
f"The value '{option_value}' must be either TRUE or FALSE "
Expand Down

0 comments on commit 3431e51

Please sign in to comment.