It looks like SSHClientConnection.run closes stderr. I assume:
- This is a common use case
- I shouldn't have to wrap stderr and mock close to avoid close being called.
Is there some way to call run that avoids .close being called?
async with asyncssh.connect(**kwargs) as conn:
print("11==-- closed=", sys.stderr.closed) # closed=False
result = await conn.run(command=shellCommand,
check=True,
stdout=stdout,
stderr=stderr,
stdin=StringIO(stdinText)
)
print("11==-- closed=", sys.stderr.closed) # closed=True