Author mjpieters
Recipients mjpieters
Date 2017-04-24.11:01:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493031661.61.0.130025045687.issue30154@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2017-04-24 11:01:01mjpieterssetrecipients: + mjpieters
2017-04-24 11:01:01mjpieterssetmessageid: <1493031661.61.0.130025045687.issue30154@psf.upfronthosting.co.za>
2017-04-24 11:01:01mjpieterslinkissue30154 messages
2017-04-24 11:01:01mjpieterscreate