Message257283
Doesn’t this scenario apply equally to run(), or check_output() in 3.4?
I suspect the explicit p.wait() call is not needed either. The context manager should already be calling wait().
One possible problem that I can think of: if you set a timeout, then interrupt the call with KeyboardInterrupt or similar, the context manager will now wait without without a timeout. Demo:
# Hit Ctrl+C before the 3 s timeout, and it will delay 10 s
call('trap "" INT && sleep 10', shell=True, timeout=3) |
|
Date |
User |
Action |
Args |
2016-01-01 09:01:29 | martin.panter | set | recipients:
+ martin.panter, vstinner, SilentGhost, Mike Pomraning |
2016-01-01 09:01:29 | martin.panter | set | messageid: <1451638889.68.0.248338851045.issue25942@psf.upfronthosting.co.za> |
2016-01-01 09:01:29 | martin.panter | link | issue25942 messages |
2016-01-01 09:01:29 | martin.panter | create | |
|