@@ -437,12 +437,10 @@ class StdCaptureFD(Capture):
437437 reads from sys.stdin). If any of the 0,1,2 file descriptors
438438 is invalid it will not be captured.
439439 """
440- def __init__ (self , out = True , err = True , mixed = False ,
441- in_ = True , patchsys = True ):
440+ def __init__ (self , out = True , err = True , in_ = True , patchsys = True ):
442441 self ._options = {
443442 "out" : out ,
444443 "err" : err ,
445- "mixed" : mixed ,
446444 "in_" : in_ ,
447445 "patchsys" : patchsys ,
448446 }
@@ -452,7 +450,6 @@ def _save(self):
452450 in_ = self ._options ['in_' ]
453451 out = self ._options ['out' ]
454452 err = self ._options ['err' ]
455- mixed = self ._options ['mixed' ]
456453 patchsys = self ._options ['patchsys' ]
457454 if in_ :
458455 try :
@@ -473,9 +470,7 @@ def _save(self):
473470 except OSError :
474471 pass
475472 if err :
476- if out and mixed :
477- tmpfile = self .out .tmpfile
478- elif hasattr (err , 'write' ):
473+ if hasattr (err , 'write' ):
479474 tmpfile = err
480475 else :
481476 tmpfile = None
@@ -540,17 +535,15 @@ class StdCapture(Capture):
540535 modifies sys.stdout|stderr|stdin attributes and does not
541536 touch underlying File Descriptors (use StdCaptureFD for that).
542537 """
543- def __init__ (self , out = True , err = True , in_ = True , mixed = False ):
538+ def __init__ (self , out = True , err = True , in_ = True ):
544539 self ._oldout = sys .stdout
545540 self ._olderr = sys .stderr
546541 self ._oldin = sys .stdin
547542 if out and not hasattr (out , 'file' ):
548543 out = TextIO ()
549544 self .out = out
550545 if err :
551- if mixed :
552- err = out
553- elif not hasattr (err , 'write' ):
546+ if not hasattr (err , 'write' ):
554547 err = TextIO ()
555548 self .err = err
556549 self .in_ = in_
0 commit comments