tools: Add timeout for pandoc.

- Saw pandoc hang.
This commit is contained in:
Andrew Hamilton 2021-05-06 00:11:54 +10:00
parent beb98889ca
commit fa54f38e40

View file

@ -394,7 +394,8 @@ def html_syntax(path):
def pandoc(path):
with tempfile.TemporaryDirectory() as temp_dir:
temp_path = os.path.join(temp_dir, "temp.html")
_do_command(["pandoc", "-t", "html", "-o", temp_path, path])
_do_command(["pandoc", "-t", "html", "-o", temp_path, path],
timeout=TIMEOUT)
return elinks(temp_path)