mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-18 06:18:08 +00:00
parent
580693b1ec
commit
bfbc6ff0be
@ -77,8 +77,11 @@ def wait_for_process_termination(process, timeout=10):
|
|||||||
:param timeout: Timeout in seconds
|
:param timeout: Timeout in seconds
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if sys.version_info >= (3,5):
|
if sys.version_info >= (3, 5):
|
||||||
|
try:
|
||||||
yield from asyncio.wait_for(process.wait(), timeout=timeout)
|
yield from asyncio.wait_for(process.wait(), timeout=timeout)
|
||||||
|
except ProcessLookupError:
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
while timeout > 0:
|
while timeout > 0:
|
||||||
if process.returncode is not None:
|
if process.returncode is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user