config: replace usage of py.io.dupfile
As part of the effort to remove uses of `py`.
This commit is contained in:
parent
e5d6e58625
commit
c72a1b2933
|
@ -308,7 +308,9 @@ class PytestPluginManager(PluginManager):
|
||||||
err = sys.stderr
|
err = sys.stderr
|
||||||
encoding = getattr(err, "encoding", "utf8")
|
encoding = getattr(err, "encoding", "utf8")
|
||||||
try:
|
try:
|
||||||
err = py.io.dupfile(err, encoding=encoding)
|
err = open(
|
||||||
|
os.dup(err.fileno()), mode=err.mode, buffering=1, encoding=encoding,
|
||||||
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
self.trace.root.setwriter(err.write)
|
self.trace.root.setwriter(err.write)
|
||||||
|
|
Loading…
Reference in New Issue