mailr10120 - /branches/multi_processor_merge/multi/processor.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 06, 2010 - 19:19:
Author: bugman
Date: Wed Jan  6 19:19:52 2010
New Revision: 10120

URL: http://svn.gna.org/viewcvs/relax?rev=10120&view=rev
Log:
Reverted r10119 as this was not fixing the IO redirection problem.

The command used was:
svn merge -r10119:10118 .


Modified:
    branches/multi_processor_merge/multi/processor.py

Modified: branches/multi_processor_merge/multi/processor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_processor_merge/multi/processor.py?rev=10120&r1=10119&r2=10120&view=diff
==============================================================================
--- branches/multi_processor_merge/multi/processor.py (original)
+++ branches/multi_processor_merge/multi/processor.py Wed Jan  6 19:19:52 2010
@@ -492,9 +492,7 @@
         # output on masters and slaves
         # processor id the replacement stdio file like objects are stored in 
the modulevariable
         # global_stdio_capture
-
-        # Edward:  This has been commented out as this is where IO 
redirection goes haywire!
-        #self.setup_stdio_capture(stdio_capture)
+        self.setup_stdio_capture(stdio_capture)
 
 
     def abort(self):
@@ -548,15 +546,9 @@
         @type stdio_capture:    list of two file-like objects
         '''
 
-        # Store the original STDOUT and STDERR for restoring later on.
-        self.orig_stdout = sys.stdout
-        self.orig_stderr = sys.stderr
-
-        # Default to self.stdio_capture if stdio_capture is not supplied.
         if stdio_capture == None:
             stdio_capture = self.stdio_capture
 
-        # IO redirection.
         sys.stdout = self.stdio_capture[0]
         sys.stderr = self.stdio_capture[1]
 
@@ -743,9 +735,8 @@
         @note:  sys.stdout and sys.stderr are replaced with sys.__stdout__ 
ans sys.__stderr__.
         '''
 
-        # Restore the IO streams.
-        sys.stdout = self.orig_stdout
-        sys.stderr = self.orig_stderr
+        sys.stdout = sys.__stdout__
+        sys.stderr = sys.__stderr__
 
 
     def return_object(self, result):




Related Messages


Powered by MHonArc, Updated Wed Jan 06 19:40:02 2010