Improve CommandEventHandler subprocess failure error message

This commit is contained in:
Kristóf Tóth 2019-05-13 14:52:17 +02:00
parent 1617761184
commit 94dee63a41

View File

@ -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):