aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xapp.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/app.py b/app.py
index 3638151..1ed34a0 100755
--- a/app.py
+++ b/app.py
@@ -118,6 +118,11 @@ class Response:
def run_do(*args, **kwargs):
output = subprocess.run(args, stdin=DEVNULL, stdout=PIPE, stderr=STDOUT, universal_newlines=True, **kwargs)
+ # Include the output in the exception's message:
+ try:
+ output.check_returncode()
+ except Exception as e:
+ raise RuntimeError("Command's output was this:\n" + output.stdout) from e
return output.stdout