From 91a57aa8c91d19fda9b243fc39b2bf366c29ebc7 Mon Sep 17 00:00:00 2001 From: Akbar Rahman Date: Tue, 2 Jan 2024 17:52:24 +0000 Subject: [PATCH] check if pandoc-server fails to start --- gronk.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gronk.py b/gronk.py index 8fb230c..71f3863 100755 --- a/gronk.py +++ b/gronk.py @@ -527,6 +527,11 @@ def start_pandoc_server(): break except requests.ConnectionError: time.sleep(0.1) + rc = process.poll() + if rc is not None: + print(f"PANDOC SERVER FAILED TO START: {rc=}") + print(process.stdout.read().decode("utf-8")) + raise Exception("Pandoc server failed to start") elapsed_time = time.time() - start_time print(f"pandoc-server started {version=} {elapsed_time=}")