From: Karl Hasselström Date: Tue, 21 Aug 2007 16:15:38 +0000 (+0200) Subject: Refactor subprocess creation X-Git-Tag: v0.14~113 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/f0de3f92cc85c3d5e1dd3511578b01e46652e93c?hp=f0de3f92cc85c3d5e1dd3511578b01e46652e93c Refactor subprocess creation Instead of having a gazillion different little functions that wrap os.spawnvp and popen2.Popen3, make a single wrapper that's flexible enough to cater to everyone. Apart from making the code cleaner and easier to read, this has the added benefit of making it possible to add little things such as extra safety checks and logging. Ideally, I'd have liked this wrapper to wrap subprocess.Popen, but that's only available in Python 2.4 and up, so we'll have to make do with os.spawnvp and popen2.Popen3 for now, even though they suck. Signed-off-by: Karl Hasselström ---