Martin Panter added the comment:
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)
----------
nosy: +martin.panter
stage: -> patch review
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25942>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com