aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/core/testcase.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2022-01-21 11:08:50 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2022-01-21 11:10:41 +0100
commit769898458263b7f138c7ffc9126c376781fa71d4 (patch)
tree05f08b043668069f3928f455b6594fc60f612608 /xtesting/core/testcase.py
parent99e784d223d0e1f11eed647d4805f825e5246696 (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>
Diffstat (limited to 'xtesting/core/testcase.py')
-rw-r--r--xtesting/core/testcase.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/xtesting/core/testcase.py b/xtesting/core/testcase.py
index f7814f72..179a5684 100644
--- a/xtesting/core/testcase.py
+++ b/xtesting/core/testcase.py
@@ -302,6 +302,8 @@ class TestCase(metaclass=abc.ABCMeta):
path = 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)):