diff options
author | 2022-01-21 11:08:50 +0100 | |
---|---|---|
committer | 2022-01-21 11:11:27 +0100 | |
commit | a1c07b7eaf67cbbbf174babddecb6b112c08bc84 (patch) | |
tree | 8aa8adc6343755341ed9e6d29ba9d5fc82e092ad /xtesting/core/ansible.py | |
parent | 8f58d26fca9103d6f320ec27d50505cd83ea8a99 (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/ansible.py')
-rw-r--r-- | xtesting/core/ansible.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xtesting/core/ansible.py b/xtesting/core/ansible.py index 7ccace9f..fa7b533c 100644 --- a/xtesting/core/ansible.py +++ b/xtesting/core/ansible.py @@ -58,7 +58,7 @@ class Ansible(testcase.TestCase): 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 |