It occured when running ansible.
Change-Id: I908270fdb76fbc3bdf60787b189cdbc29c41b52b
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit
769898458263b7f138c7ffc9126c376781fa71d4)
kwargs["quiet"] = True
kwargs["artifact_dir"] = self.res_dir
runner = ansible_runner.run(**kwargs)
- self.details = runner.stats
+ self.details = runner.stats or {}
if runner.rc == 0:
self.result = 100
status = self.EX_OK
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)):