Closed mristin closed 6 years ago
Hmm, I think the implementation for check_call(...)
and check_output(...)
would be run(...)
and run(...).output
. It feels like those two use cases are already handled without much complexity with the current API, and recent Python versions also suggest using subprocess.run()
instead of the older API. Is there a reason why using run(...)
directly is inconvenient?
Sorry, you are completely right. I had some dead code lying around related to paramiko and closing of the out and err streams which confused me.
Just before I go on and refactor the code base: shell.run()
and shell.run(...).output
involve no closing of the streams, right?
I'm not sure which streams you're referring to? To the best of my recollection, yhey don't close any file objects that get passed in, if that's what you mean.
The discussion was moved to #77.
I implemented a wrapper around spur and added check_call and check_output to mimic subprocess.check_call and check_output, respectively.
Should I make a pull request and add them to spur.py?