]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
ansible: include the contents of the failure log in the exception 757/head
authorAndrew Schoen <aschoen@redhat.com>
Thu, 17 Dec 2015 19:51:45 +0000 (13:51 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 17 Dec 2015 19:51:45 +0000 (13:51 -0600)
When parsing of the ansible failure log fails this will actually print
the contents of the malformed log in the raised AnsibleFailedError.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
teuthology/task/ansible.py

index f95a7fef52d2d134f4fc83f08fd3c0baa26085ce..07dc50b5fa63d7b366fd0c3686b5d08e226328e6 100644 (file)
@@ -272,7 +272,7 @@ class Ansible(Task):
                         self.failure_log.name,
                     )
                 )
-                failures = fail_log
+                failures = fail_log.read().replace('\n', '')
 
         if failures:
             self._archive_failures()