diff options
-rw-r--r-- | ice_validator/tests/test_environment_file_parameters.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ice_validator/tests/test_environment_file_parameters.py b/ice_validator/tests/test_environment_file_parameters.py index 100e4a1..ff57c35 100644 --- a/ice_validator/tests/test_environment_file_parameters.py +++ b/ice_validator/tests/test_environment_file_parameters.py @@ -268,10 +268,11 @@ def env_violation(yaml_file, parameter, persistent): env_yaml = environment_pair.get("eyml") parameters = env_yaml.get("parameters", {}) in_env = False - for param, value in parameters.items(): - if re.match(parameter, parameter): - in_env = True - break + if parameters: # env file can be just parameters: + for param, value in parameters.items(): + if re.match(parameter, param): + in_env = True + break # confusing return. This function is looking for a violation. return not persistent == in_env |