➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 mjpieters
收信人 mjpieters
日期 2017-04-24.11:01:01
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1493031661.61.0.130025045687.issue30154@psf.upfronthosting.co.za>
In-reply-to
内容
Apologies, I copied the wrong sleep 10 demo. The correct demo is:

cat >test.sh<<EOF
> #!/bin/sh
> sleep 10
> EOF
time bin/python -c "import subprocess; subprocess.run(['./test.sh'], stderr=subprocess.PIPE, timeout=3)"
Traceback (most recent call last):
  File "/Users/mjpieters/Development/Library/buildout.python/parts/opt/lib/python3.6/subprocess.py", line 405, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
  File "/Users/mjpieters/Development/Library/buildout.python/parts/opt/lib/python3.6/subprocess.py", line 836, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/Users/mjpieters/Development/Library/buildout.python/parts/opt/lib/python3.6/subprocess.py", line 1497, in _communicate
    self._check_timeout(endtime, orig_timeout)
  File "/Users/mjpieters/Development/Library/buildout.python/parts/opt/lib/python3.6/subprocess.py", line 864, in _check_timeout
    raise TimeoutExpired(self.args, orig_timeout)
subprocess.TimeoutExpired: Command '['./test.sh']' timed out after 3 seconds

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/mjpieters/Development/Library/buildout.python/parts/opt/lib/python3.6/subprocess.py", line 410, in run
    stderr=stderr)
subprocess.TimeoutExpired: Command '['./test.sh']' timed out after 3 seconds

real	0m10.054s
user	0m0.033s
sys	0m0.015s
历史
日期 用户 动作 参数
2017-04-24 11:01:01mjpieters修改recipients: + mjpieters
2017-04-24 11:01:01mjpieters修改messageid: <1493031661.61.0.130025045687.issue30154@psf.upfronthosting.co.za>
2017-04-24 11:01:01mjpieters链接issue30154 messages
2017-04-24 11:01:01mjpieters创建