remove unneccessary indirections and options
This commit is contained in:
parent
cfd43a9b02
commit
cde970be69
|
@ -120,9 +120,6 @@ class CaptureManager:
|
||||||
f.close()
|
f.close()
|
||||||
return newf
|
return newf
|
||||||
|
|
||||||
def _makestringio(self):
|
|
||||||
return TextIO()
|
|
||||||
|
|
||||||
def _getcapture(self, method):
|
def _getcapture(self, method):
|
||||||
if method == "fd":
|
if method == "fd":
|
||||||
return StdCaptureFD(
|
return StdCaptureFD(
|
||||||
|
@ -130,10 +127,7 @@ class CaptureManager:
|
||||||
err=self._maketempfile(),
|
err=self._maketempfile(),
|
||||||
)
|
)
|
||||||
elif method == "sys":
|
elif method == "sys":
|
||||||
return StdCapture(
|
return StdCapture(out=TextIO(), err=TextIO())
|
||||||
out=self._makestringio(),
|
|
||||||
err=self._makestringio(),
|
|
||||||
)
|
|
||||||
elif method == "no":
|
elif method == "no":
|
||||||
return NoCapture()
|
return NoCapture()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue