Open fuzzball81 opened 7 years ago
I would suggest using a finally clause as part of the try... except to ensure they are always cleaned up in either a good or failing case.
May also want to investigate using subprocess.check_call or subprocess.check_output in place of using subprocess.Popen. This will remove the need for the pipes.
I'd expect the python interpreter to close them automatically on garbage collection, but you might be right.
I see this as a low priority before 1.0 - please feel free to submit a fix :)
In utils.cmd.run (utils/cmd.py) several subprocess.PIPE instances are spawned and never closed, which can cause a leak.