From 6829e650348181b1088bf8c1fe4a04c9164ae6f3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 24 Jan 2023 18:21:21 +0530 Subject: [PATCH] forward the exit code --- src/calibre/utils/windows/winspeech.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calibre/utils/windows/winspeech.py b/src/calibre/utils/windows/winspeech.py index a23bfe4c33..05c9353539 100644 --- a/src/calibre/utils/windows/winspeech.py +++ b/src/calibre/utils/windows/winspeech.py @@ -19,8 +19,12 @@ def decode_msg(line: bytes) -> dict: return ans +def start_worker(): + return start_pipe_worker('from calibre_extensions.winspeech import run_main_loop; raise SystemExit(run_main_loop())') + + def develop_speech(text='Lucca brazzi sleeps with the fishes'): - p = start_pipe_worker('from calibre_extensions.winspeech import run_main_loop; run_main_loop()') + p = start_worker() print('\x1b[32mSpeaking', text, '\x1b[39m]]'[:-2], flush=True) q = Queue()