From 94dee63a4181cf778bdedbde8327e3cd1f08d4b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Mon, 13 May 2019 14:52:17 +0200 Subject: [PATCH] Improve CommandEventHandler subprocess failure error message --- lib/tfw/components/pipe_io_event_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tfw/components/pipe_io_event_handler.py b/lib/tfw/components/pipe_io_event_handler.py index c0f54aa..d0eda41 100644 --- a/lib/tfw/components/pipe_io_event_handler.py +++ b/lib/tfw/components/pipe_io_event_handler.py @@ -129,7 +129,7 @@ class CommandEventHandler(PipeIOEventHandler): return_code = self._proc.wait() if return_code != 0: _, stderr = self._proc.communicate() - raise RuntimeError(f'Subprocess failed: {stderr.decode()}') + raise RuntimeError(f'Subprocess failed ({return_code})! Stderr:\n{stderr.decode()}') def cleanup(self): with suppress(ProcessLookupError):