diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2022-01-21 11:08:50 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2022-01-21 14:04:05 +0100 |
commit | 2403fcb54109a09c298cec1a2f84988f9c772542 (patch) | |
tree | 1cc6d2962958c4ab97c6d85bb033646f2b24a591 /xtesting/core | |
parent | c3584454cb143834c78014c11ec45eeb1f0eda31 (diff) |
Protect if detail is returned as None
It occured when running ansible.
Change-Id: I908270fdb76fbc3bdf60787b189cdbc29c41b52b
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 769898458263b7f138c7ffc9126c376781fa71d4)
Diffstat (limited to 'xtesting/core')
-rw-r--r-- | xtesting/core/testcase.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xtesting/core/testcase.py b/xtesting/core/testcase.py index 8faf3f43..bccf76d2 100644 --- a/xtesting/core/testcase.py +++ b/xtesting/core/testcase.py @@ -305,6 +305,8 @@ class TestCase(): path = urllib.parse.urlparse(dst_s3_url).path.strip("/") dst_http_url = os.environ["HTTP_DST_URL"] output_str = "\n" + # protects if test cases return details as None + self.details = self.details or {} self.details["links"] = [] for log_file in [self.output_log_name, self.output_debug_log_name]: if os.path.exists(os.path.join(self.dir_results, log_file)): |