From d87106650286493af38cecd423b58bdcead15db4 Mon Sep 17 00:00:00 2001 From: "Lovett, Trevor" Date: Tue, 29 Oct 2019 11:33:26 -0500 Subject: [VVP] Make Preload Generation more reslient to failures Ensure that errors during preload do not prevent validation report creation Issue-ID: VVP-335 Signed-off-by: Lovett, Trevor Change-Id: I0cfd411b6a034422e349b96c462e68a4f0ceb876 --- ice_validator/preload/model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ice_validator/preload') diff --git a/ice_validator/preload/model.py b/ice_validator/preload/model.py index db60438..3ca7bda 100644 --- a/ice_validator/preload/model.py +++ b/ice_validator/preload/model.py @@ -251,7 +251,8 @@ def env_path(heat_path): :return: path to env file (assumes it is present and named correctly) """ base_path = os.path.splitext(heat_path)[0] - return "{}.env".format(base_path) + env_path = "{}.env".format(base_path) + return env_path if os.path.exists(env_path) else None class VnfModule(FilterBaseOutputs): -- cgit 1.2.3-korg