vcs: use a timeout of 20 seconds

This commit is contained in:
lilydjwg 2019-11-03 23:57:16 +08:00
parent 38c1a4ce9d
commit 374f7c3d42

View file

@ -44,7 +44,7 @@ async def get_version(name, conf, **kwargs):
stderr=asyncio.subprocess.PIPE,
)
output, error = await p.communicate()
output, error = await asyncio.wait_for(p.communicate(), 20)
output = output.strip().decode('latin1')
error = error.strip().decode('latin1')