Author: bugman Date: Wed Jan 6 18:57:55 2010 New Revision: 10117 URL: http://svn.gna.org/viewcvs/relax?rev=10117&view=rev Log: Modified the IO redirection methods. The original IO streams are stored and then restore instead of sys.__stdout__ and sys.__stderr__. This might help in the multi-processor branch where IO redirection has gone haywire. Modified: 1.3/test_suite/relax_test_runner.py Modified: 1.3/test_suite/relax_test_runner.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/relax_test_runner.py?rev=10117&r1=10116&r2=10117&view=diff ============================================================================== --- 1.3/test_suite/relax_test_runner.py (original) +++ 1.3/test_suite/relax_test_runner.py Wed Jan 6 18:57:55 2010 @@ -42,6 +42,10 @@ The start of STDOUT and STDERR capture occurs here. """ + # Store the original STDOUT and STDERR for restoring later on. + self.orig_stdout = sys.stdout + self.orig_stderr = sys.stderr + # Catch stdout and stderr. self.capt = StringIO() sys.stdout = self.capt @@ -57,9 +61,9 @@ The end of STDOUT and STDERR capture occurs here. """ - # Restore stdout and stderr. - sys.stdout = sys.__stdout__ - sys.stderr = sys.__stderr__ + # Restore the IO streams. + sys.stdout = self.orig_stdout + sys.stderr = self.orig_stderr def addError(self, test, err):