From 374f7c3d420d60b72131fb33ab4760b5217d610f Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Sun, 3 Nov 2019 23:57:16 +0800 Subject: [PATCH] vcs: use a timeout of 20 seconds --- nvchecker/source/vcs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvchecker/source/vcs.py b/nvchecker/source/vcs.py index d620245..03bede0 100644 --- a/nvchecker/source/vcs.py +++ b/nvchecker/source/vcs.py @@ -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')