From ca86159dda758f4c4890c0983a2c987ed8572c8c Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Fri, 4 Sep 2020 22:53:05 +0200 Subject: [PATCH] task/ansible: reset fail_log file index The yaml.safe_load reads the fail_log opened file and shifts the offset to the end of stream. However in case of error we need to shift offset to the begin of the file stream, so we can read data again. Signed-off-by: Kyr Shatskyy --- teuthology/task/ansible.py | 1 + 1 file changed, 1 insertion(+) diff --git a/teuthology/task/ansible.py b/teuthology/task/ansible.py index 823bb20fc..9103b357e 100644 --- a/teuthology/task/ansible.py +++ b/teuthology/task/ansible.py @@ -307,6 +307,7 @@ class Ansible(Task): self.failure_log.name, e ) ) + fail_log.seek(0) failures = fail_log.read().replace('\n', '') if failures: -- 2.47.3