Linux integration tests: Fix error handling for Python 3.4

Python 3.4 changed the TestCase._outcome semantics, adjust accordingly.
This commit is contained in:
Martin Pitt 2014-09-02 17:19:08 +02:00
parent e5bd3e80f3
commit 01ab81233f

View file

@ -109,7 +109,8 @@ class Tests(unittest.TestCase):
self.stop_daemon()
# on failures, print daemon log
if not self._outcomeForDoCleanups.success and self.log:
errors = [x[1] for x in self._outcome.errors if x[1]]
if errors and self.log:
with open(self.log.name) as f:
sys.stderr.write('\n-------------- daemon log: ----------------\n')
sys.stderr.write(f.read())