Skip to content

Commit

Permalink
Fix error handlin in case exception happens in fixture loading
Browse files Browse the repository at this point in the history
The problem here is that the output buffering is already reset, but we
try to use it.
  • Loading branch information
nijel committed Dec 12, 2014
1 parent 0b8110c commit f8ae2a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions django_jenkins/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ def _make_testcase_element(self, test):
getattr(test, 'description', 'UNKNOWN')))
return testcase

def _restoreStdout(self):
'''Disables buffering once the stdout/stderr are reset.'''
super(EXMLTestResult, self)._restoreStdout()
self.buffer = False

def _add_tb_to_test(self, test, test_result, err):
'''Add a traceback to the test result element'''
exc_class, exc_value, tb = err
Expand Down

0 comments on commit f8ae2a8

Please sign in to comment.