mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont hang forever if test process doesnt quit
This commit is contained in:
parent
a48a0fc52f
commit
0c7aa15980
@ -63,7 +63,11 @@ def run(*args):
|
||||
if len(args) == 1:
|
||||
args = shlex.split(args[0])
|
||||
print(' '.join(args), flush=True)
|
||||
ret = subprocess.Popen(args).wait()
|
||||
try:
|
||||
ret = subprocess.Popen(args).wait(timeout=600)
|
||||
except subprocess.TimeoutExpired as err:
|
||||
print(err, file=sys.stderr, flush=True)
|
||||
print('Timed out running:', ' '.join(args), flush=True, file=sys.stderr)
|
||||
if ret != 0:
|
||||
raise SystemExit(ret)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user