Message292220
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 |
|
Date |
User |
Action |
Args |
2017-04-24 11:01:01 | mjpieters | set | recipients:
+ mjpieters |
2017-04-24 11:01:01 | mjpieters | set | messageid: <1493031661.61.0.130025045687.issue30154@psf.upfronthosting.co.za> |
2017-04-24 11:01:01 | mjpieters | link | issue30154 messages |
2017-04-24 11:01:01 | mjpieters | create | |
|